Create your own character set using [NSCharacterSet characterSetWithCharactersInString:], then trim as you were doing to see if the returned string has a length value.
Or you could use invertedSet to remove all non-set characters, if that would help to produce a cleaned string.