Soundex for TCL

Current Version: 1.0
Author: Evan Rempel erempel@UVic.CA

Soundex string
Given as argument: a character string.
Returns: a static string, 4 characters long
This string is the Soundex key for the argument string.

Reference: Adapted from Knuth, D.E. (1973) The art of computer programming; Volume 3: Sorting and searching. Addison-Wesley Publishing Company: Reading, Mass. Page 392. Special cases: Leading or embedded spaces, numerals, or punctuation are squeezed out before encoding begins. Null strings or those with no encodable letters return the code 'Z000'.

Test data from Knuth (1973):
Euler
E460
Gauss
G200
Hilbert
H416
Knuth
K530
Lloyd
L300
Lukasiewicz
L222