ios 去除字符串首尾空格、换行

去除首尾空格:spa

NSString *content = [textView.text stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];

去除首尾空格和换行:code

NSString *content = [textView.text stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
相关文章
相关标签/搜索