Skip to content

Instantly share code, notes, and snippets.

@ajonnet
Created July 20, 2014 12:30
Show Gist options
  • Save ajonnet/9c43b7253123239667b1 to your computer and use it in GitHub Desktop.
Save ajonnet/9c43b7253123239667b1 to your computer and use it in GitHub Desktop.
Trim WhiteSpaces from ends of String
//Trimming WhiteSpaces from String
NSString *str = @" String with whitespaces ";
str = [str stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment