NSString *myString = @"     New Profile     "
i want to remove the front and end of the White space in my String.
  NSString *myString = @"     New Profile     "
i want to remove the front and end of the White space in my String.
Try this it will also remove blank new lines:
NSString *temp = @" untrimmed string ";
NSString *newString = [temp stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
