Find a name in a list if the name is spelt wrong

Posted by Matt on Stack Overflow See other posts from Stack Overflow or by Matt
Published on 2010-04-19T06:18:27Z Indexed on 2010/04/19 6:23 UTC
Read the original article Hit count: 306

Filed under:
|

I've got a list of names which some code checks against to see if the person exists, and if so do some stuff..

My issue is that I want to handle the case of the name being entered incorrectly.. I.e. I have a list of names

Bob
Frank
Tom
Tim
John

If I type in Joohn, I want it to ask me if I meant John. If I type Tm, I get asked if I meant Tim, if I say no, it asks if i meant Tom.. Etc..

Has anyone done something like this before?

© Stack Overflow or respective owner

Related posts about c#

Related posts about string-comparison