New line removal in objective c
i was coding an iphone app yesterday and ran into a glitch. it looks like apples api metho to remove new lines doesnt really work that well. i forget the syntax but its something like this
NSString *temp = [temp stringFromStrippingOutCharacterSet:[NSCharacterSet newLineCharacters]];
It turns out that it does not strip out /n, so if you need to strip out new characters, your better off writing your own parser like i did.
NSString *temp = [temp stringFromStrippingOutCharacterSet:[NSCharacterSet newLineCharacters]];
It turns out that it does not strip out /n, so if you need to strip out new characters, your better off writing your own parser like i did.
No comments:
Post a Comment