jjzjj

endLineWithLineFeed

全部标签

swift - 为什么在 Data.base64EncodedString 中使用 endLineWithLineFeed 不会在编码字符串的末尾添加新行?

我希望swift代码具有与以下JavaAndroid代码相同的行为Java安卓byte[]binary={1,2,3};//adherestoRFC2045Stringoutput=Base64.encodeToString(binary,Base64.DEFAULT);//"AQID\n"android.util.Log.i("CHEOK",output);//"5"android.util.Log.i("CHEOK",""+output.length());swiftimportFoundationletbinary:[UInt8]=[1,2,3]letoutput=Data(bi