摘要:
1、检测字符串中是否含有特殊字符-(BOOL)isIncludeSpecialCharact: (NSString *)str {//***需要过滤的特殊字符:~¥#&*<>《》()[]{}【】^@/£¤¥|§¨「」『』¢¬ ̄~@#¥&*()——+|《》$_€。NSRange urgentRange = [str rangeOfCharacterFromSet: [NSCharacterSetcharacterSetWithCharactersInString: @"~¥#&*<>《》()[]{}【】^@/ 阅读全文
摘要:
NSString *str=@"12231354654656"; NSUInteger cnt = 0, length = [str length]; NSRange range = NSMakeRange(0, length); while(range.location != NSNotFound) { range = [str rangeOfString: @"65" options:0 range:range]; if(range.location != NSNotFound) { range = NSMakeRange(range.locatio 阅读全文