I want to check if a particular string is just made up of spaces. It could be any number of spaces, including zero. What is the best way to determine that?
Try this:
[mystring stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
or
[mystring stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];