iOS精品文章iOS开发攻城狮的集散地

iOS开发小点·NSString过滤特定字符

2018-10-17  本文已影响80人  小码僧
NSCharacterSet *filterSet = [NSCharacterSet characterSetWithCharactersInString:@"[]{}(#%-*+=_)\\|~(<>$%^&*)_+b/<>"]; 
sourceMdl.name = [[sourceMdl.name componentsSeparatedByCharactersInSet: filterSet] componentsJoinedByString: @""];
上一篇下一篇

猜你喜欢

热点阅读