Skip to content

Instantly share code, notes, and snippets.

@heitortsergent
Created February 5, 2013 15:07
Show Gist options
  • Save heitortsergent/4715001 to your computer and use it in GitHub Desktop.
Save heitortsergent/4715001 to your computer and use it in GitHub Desktop.
Check if word exists
for(NSString* word in wordDictionary)
{
if([word hasPrefix:appDelegate2.matchLetter] && [word isEqualToString:wordString])
{
return YES;
}
}
return NO;
@igorcferreira
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment