Created
January 15, 2014 18:01
-
-
Save alvareztech/8441107 to your computer and use it in GitHub Desktop.
iOS: NSString's methods.
This file contains hidden or 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
// Trim | |
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