Created
February 5, 2013 15:07
-
-
Save heitortsergent/4715001 to your computer and use it in GitHub Desktop.
Check if word exists
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
| for(NSString* word in wordDictionary) | |
| { | |
| if([word hasPrefix:appDelegate2.matchLetter] && [word isEqualToString:wordString]) | |
| { | |
| return YES; | |
| } | |
| } | |
| return NO; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
O contains foi só como exemplo. O predicate pode ser formatado para igualar os valores. O ponto mais importante que eu quis levantar foi que uma estruturação melhor dos dados pode otimizar a busca.