String or InputRange to convert to Soundex representation.
The four character array with the Soundex result in it. The array has zero's in it if there is no Soundex representation for the string.
assert(soundexer("Gauss") == "G200"); assert(soundexer("Ghosh") == "G200"); assert(soundexer("Robert") == "R163"); assert(soundexer("Rupert") == "R163"); assert(soundexer("0123^&^^**&^") == ['\0', '\0', '\0', '\0']);
Soundex algorithm.
The Soundex algorithm converts a word into 4 characters based on how the word sounds phonetically. The idea is that two spellings that sound alike will have the same Soundex value, which means that Soundex can be used for fuzzy matching of names.