Goal: Group strings into into different letter groups.
Example letter groups: A to C, D to F, G to J, etc.
Pseudocode:
Loop through each group
Loop through each string in a collection
Print the string in the appropriate group
Question: What’s the best way to define a range of characters so we can use something like the following to check?
[NSCharacterSet(our custom character range) characterIsMember:[self.targetString.text characterAtIndex:0] ]
You can make your character sets as follows for arbitrary ranges of ASCII characters:
Of course, you could equivalently write: