Skip to content

Instantly share code, notes, and snippets.

@anujose1989
Last active November 26, 2018 08:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anujose1989/f0f1b2163e2a3e31132269c89df190e8 to your computer and use it in GitHub Desktop.
Save anujose1989/f0f1b2163e2a3e31132269c89df190e8 to your computer and use it in GitHub Desktop.
To Lower Case
-(NSString *) ToLowerCase : (NSMutableString *) inputString
{
NSInteger i = 0;
while (i < inputString.length)
{
int character = [inputString characterAtIndex:i];
if (character < 97)
{
[inputString replaceCharactersInRange:NSMakeRange(i, 1)
withString:[NSString stringWithFormat:@"%c",character+32]];
}
i++;
}
return inputString;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment