如何从Objective-C中的字符串中删除新行或换行符

时间:2016-11-05 13:04:52

标签: html objective-c newline carriage-return

在浏览器中我得到像

这样的输出
"post":"<p>this is for testing<\/p>\r\n",

但是当我将此输出存储在字符串中时,它返回:

"post":"<p>this is for testing<\/p>",

并在标签上显示它扩展新的空白行。 如何删除空行?

[myMutableString stringByReplacingOccurrencesOfString:@"\n" withString: @""];并且一切都无效。

0 个答案:

没有答案