NSCharacterSet capitalizedLetterCharacterSet
+ (id)capitalizedLetterCharacterSet
Return Value of [NSCharacterSet capitalizedLetterCharacterSet]
A character set containing the characters in the category of Titlecase Letters.
NSCharacterSet capitalizedLetterCharacterSet example.
unichar aChar = [myString characterAtIndex: someIndex];
NSCharacterSet* theCaps [NSCharacterSet capitalizedLetterCharacterSet];
if ([theCaps characterIsMember: aChar])
{
//Character is an upper case character
}
else
{
//Character is not an upper case character.
}
NSCharacterSet* theCaps [NSCharacterSet capitalizedLetterCharacterSet];
if ([theCaps characterIsMember: aChar])
{
//Character is an upper case character
}
else
{
//Character is not an upper case character.
}
Example of [NSCharacterSet capitalizedLetterCharacterSet].
unichar testChar = [inputString characterAtIndex:i+1];
NSCharacterSet *theCaps = [NSCharacterSet capitalizedLetterCharacterSet];
if ([theCaps characterIsMember:testChar]) {
NSLog(@\"Uppercase\");
}
else {
NSLog(@\"Lowercase\");
}
NSCharacterSet capitalizedLetterCharacterSet example.
NSCharacterSet *letters = [NSCharacterSet capitalizedLetterCharacterSet];
NSCharacterSet *inStringSet = [NSCharacterSet characterSetWithCharactersInString:@\"ABCD\"];
valid = [letters isSupersetOfSet:inStringSet];
NSCharacterSet *inStringSet = [NSCharacterSet characterSetWithCharactersInString:@\"ABCD\"];
valid = [letters isSupersetOfSet:inStringSet];