Last active
December 20, 2015 15:09
Get a random letter in Objective-C
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Get a random capitol letter | |
[NSString stringWithFormat:@"%c", arc4random_uniform(26) + 'A']; | |
//...or lowercase | |
[NSString stringWithFormat:@"%c", arc4random_uniform(26) + 'a']; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment