Skip to content

Instantly share code, notes, and snippets.



Created Feb 13, 2015
What would you like to do?
Trim spaces from start/end of a NSString
NSString *string = @" this text has spaces before and after ";
NSString *trimmedString = [string stringByTrimmingCharactersInSet:
[NSCharacterSet whitespaceCharacterSet]];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.