如何从NSString中删除第一个\n字符?
编辑:只是为了澄清,我想要做的是:如果字符串的第一行包含\n字符,删除它否则什么都不做.
ie:如果字符串是这样的:
@"\nhello, this is the first line\nthis is the second line"
Run Code Online (Sandbox Code Playgroud)
并且与第一行中不包含换行符的字符串相反:
@"hello, this is the first line\nthis is the second line."
Run Code Online (Sandbox Code Playgroud)
我希望这更清楚.