Skip to content

Instantly share code, notes, and snippets.

@zeedark
Created February 5, 2012 11:15
Show Gist options
  • Save zeedark/1744818 to your computer and use it in GitHub Desktop.
Save zeedark/1744818 to your computer and use it in GitHub Desktop.
Trimming white spaces and new line characters from a NSString
// 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