(searched, but could not find a simple solution for this either here or in Cocoa docs)
Q. How can I trim all leading spaces from NSString only? (i.e. leave any other spaces int.)
Unfortunately, for my purposes, the NSString stringByTrimmingCharactersInSet method works with both the leading and the ending.
Requires compatibility with Mac OS X 10.4, GC User Guide.
trim cocoa nsstring whitespace
SirRatty Jul 08 2018-10-10T00: 00-07
source share