Return to Snippet

Revision: 55057
at January 24, 2012 17:39 by vaishnavi


Initial Code
NSString *string = @" spaces in front and at the end ";
NSString *trimmedString = [string stringByTrimmingCharactersInSet:
                                  [NSCharacterSet whitespaceAndNewlineCharacterSet]];
NSLog(trimmedString)

Initial URL
http://www.cocoanetics.com/2009/01/remove-whitespace-from-nsstring/

Initial Description
removing whitespace from front and end of a string

Initial Title
Removing whitespace from NSString

Initial Tags


Initial Language
Objective C