I am parsing an XML file with objective-c for Iphone. After parsing, the returned string variable received an input character. How to remove it from a string.
Thanks to everyone.
I believe that the following snippet will take the desired picture.
NSString *foo = @"THis is foo\r"; NSString *bar = [foo stringByTrimmingCharactersInSet:[NSCharacterSet newlineCharacterSet]];
You can also find the addition of NSString regular expressions . You can quickly replace the characters "\ r" with nothing to remove them from your document.
The wiring above mentions using RegexKit on iphone.
In fact, you need to use RegexKitLite on the iPhone and associate it with an unsupported icu library.
RegexKit is not available for iPhone.