NSCharacterSet * set = [[NSCharacterSet characterSetWithCharactersInString:@"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLKMNOPQRSTUVWXYZ"] invertedSet];
if ([strValue rangeOfCharacterFromSet:set].location == NSNotFound)
NSLog(@"character found");
else
NSLog(@"no character found");
No comments:
Post a Comment