/// 过滤的特殊字符
+ (BOOL)isIncludeSpecialCharact: (NSString *)str {
//***需要过滤的特殊字符:~¥#&*<>《》()[]{}【】^@/£¤¥|§¨「」『』¢¬ ̄[email protected]#¥&*()——+|《》$_€。
NSRange urgentRange = [str rangeOfCharacterFromSet: [NSCharacterSet characterSetWithCharactersInString: @"^%&‘,;=?$,?。:;“‘!~\\/~¥#&*<>《》()[]{}【】^@/£¤¥|§¨「」『』¢¬ ̄[email protected]#¥&*()——+|《》$_€"]];
if (urgentRange.location == NSNotFound)
{
return NO;
}
return YES;
}
时间: 2024-10-11 11:51:05