Created
February 5, 2012 11:15
-
-
Save zeedark/1744818 to your computer and use it in GitHub Desktop.
Trimming white spaces and new line characters from a NSString
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Trimming white spaces and new line characters from a NSString | |
NSString *s = @" hellow world. "; | |
NSString *trimmedString= [s stringByTrimmingCharactersInSet: [NSCharacterSet whitespaceAndNewlineCharacterSet]]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment