http://blog.sina.com.cn/s/blog_542185150100zvsb.html
NSString *string = @" spaces in front and at the end ";
NSString *trimmedString = [string stringByTrimmingCharacte rsInSet:
[NSCharacterSet whitespaceAndNewlineChar acterSet]];
NSLog(trimmedString)