Advertisement
Guest User

Untitled

a guest
Aug 25th, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. NSString *str = @"mario's test";
  2. NSString *stringWithoutSpaces = [str stringByReplacingOccurrencesOfString:@" " withString:@""];
  3.  
  4. stringWithoutSpaces = "mariostest"
  5.  
  6. *stringWithoutSpaces = [[str stringByReplacingOccurrencesOfString:@" " withString:@""]
  7. stringByReplacingOccurrencesOfString:@"'" withString:@""];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement