desc: en.wikipedia.org/wiki/Soundex
# File lib/ofac/ruby_string_extensions.rb, line 9 def ofac_soundex(census = true) str = upcase.delete(Ofac_SoundexCharsDel).squeeze str[0 .. 0] + str[1 .. -1]. delete(Ofac_SoundexCharsEx). tr(Ofac_SoundexChars, Ofac_SoundexNums)[0 .. (census ? 2 : -1)]. ljust(3, '0') rescue '' end
# File lib/ofac/ruby_string_extensions.rb, line 18 def ofac_sounds_like(other, census = true) ofac_soundex(census) == other.ofac_soundex(census) end