I have a issue in omitting \r\n after encoding the string, below is the encoded string which I have got,
QzAxODBCMDQtNDdDMi00QzhDLTg1MTAtNUE1MzU1RDIzRDA4Ojk4Mzg5MzRkYzky\r\nNTRkYWE4ODljY2Q0ZGYxNjljYTU
I have a issue in omitting \r\n after encoding the string, below is the encoded string which I have got,
QzAxODBCMDQtNDdDMi00QzhDLTg1MTAtNUE1MzU1RDIzRDA4Ojk4Mzg5MzRkYzky\r\nNTRkYWE4ODljY2Q0ZGYxNjljYTU
您可以像这样轻松地\r\n
从字符串中删除 :
NSString *outString = [inString stringByReplacingOccurrencesOfString:@"\r\n" withString:@""];
如果您想在没有\r\n
首先创建字符串的情况下创建字符串,那么这取决于您如何创建它们。例如,如果您使用Cocoa with LoveBIO_write
中的 Base64 类别,则需要在调用in之前添加此行base64EncodedString
:
BIO_set_flags(context, BIO_FLAGS_BASE64_NO_NL);
他在文章中解释了这一点。