Soundex is a phonetic algorithm for indexing names by sound, as pronounced in English. The goal is for homophones to be encoded to the same representation so that they can be matched despite minor differences in spelling. Definition by Wikipedia
The example taken from the book Modern C++ Programming with Test-Driven Development by Jeff Langr, which is great book to study.