|
-
March 22nd, 2013, 04:45 PM
#7
Re: Quuikest way to determine if an array element exists in a string
What are the min/max "words" in the AuthorSearchDict key fields (i.e. FirstName, MiddleName, LastName, etc. etc.) Maybe 2, 3 or 4? Take your input string and create sequential "names" from the string. Say the min words is two (at least a first & last) and the max is four. Then "Call of the Wild by Jack London" becomes these possible "names":
Call of
of the
the Wild
Wild by
by Jack
Jack London
Call of the
of the wild
the wild by
Wild by Jack
by Jack London
Call of the Wild
of the Wild by
the Wild by Jack
Wild by Jack London
Then do a Dictionary.ContainsKey on these possiblities. I don't know if it's faster but it is different. This would also fix your To-Do
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|