- (BOOL)hyb_isOnlyLetters {
NSCharacterSet *letterCharacterset = [[NSCharacterSet letterCharacterSet] invertedSet];
return ([self rangeOfCharacterFromSet:letterCharacterset].location == NSNotFound);
}
- (BOOL)hyb_isOnlyNumbers {
NSCharacterSet *numSet = [[NSCharacterSet characterSetWithCharactersInString:@"0123456789"] invertedSet];
return ([self rangeOfCharacterFromSet:numSet].location == NSNotFound);
}
- (BOOL)hyb_isOnlyAlphaNumeric {
NSCharacterSet *numAndLetterCharSet = [[NSCharacterSet alphanumericCharacterSet] invertedSet];
return ([self rangeOfCharacterFromSet:numAndLetterCharSet].location == NSNotFound);
}