NSString *myString = @\"A B C D E F G\";
I want to remove the spaces, so the new string would be \"ABCDEFG\".
If you want to support more than one space at a time, or support any whitespace, you can do this:
NSString* noSpaces = [[myString componentsSeparatedByCharactersInSet:[NSCharacterSet whitespaceCharacterSet]] componentsJoinedByString:@""];