后台返回去掉回车 空格符

tempstr = [tempstr stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; //去除掉首尾的空白字符和换行字符

tempstr = [tempstr stringByReplacingOccurrencesOfString:@" " withString:@""];

tempstr = [tempstr stringByReplacingOccurrencesOfString:@"\n" withString:@""];

你可能感兴趣的:(后台返回去掉回车 空格符)