NSString去掉换行符和空白字符
NSString* headerData=***;headerData = [headerData stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; //去除掉首尾的空白字符和换行字符headerData = [headerData stringByReplacingOccurrencesOfString:@"\r" withString:@""];headerData = [headerData stringByReplacingOccurrencesOfString:@"\n" withString:@""];如此即可。
补充:移动开发 , IOS ,