I have an NSString and I want to find the number of spaces in it. What's the fastest way?
Perhaps not the fastest to execute, but the fastest to type up:
[[myString componentsSeparatedByString:@" "] count]-1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With