iOS 之 NSString 去除前后空格和回车键

NSString *string = @" spaces in front and at the end ";
NSString *trimmedString = [string stringByTrimmingCharactersInSet:
[NSCharacterSet whitespaceAndNewlineCharacterSet]]; 
原文地址:https://www.cnblogs.com/SimonGao/p/5062413.html