Skip to content

Instantly share code, notes, and snippets.

@WJachowicz
Created June 15, 2012 08:57
Show Gist options
  • Save WJachowicz/2935503 to your computer and use it in GitHub Desktop.
Save WJachowicz/2935503 to your computer and use it in GitHub Desktop.
Trim whitespaces from NSString
NSString * text = @" some text ";
text = [text stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment