mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-30 06:49:24 +01:00
Added length=0 handling to soundex to return the everything.
This commit is contained in:
parent
b8f2bbb1bb
commit
e4715d4d3f
@ -191,6 +191,6 @@ def soundex(s, length=4):
|
||||
L.append(c)
|
||||
L = [c for c in L if c != '0'] + ['0', '0', '0']
|
||||
s = ''.join(L)
|
||||
return length and s[:length] or s
|
||||
return length and s[:length] or s.rstrip('0')
|
||||
|
||||
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78:
|
||||
|
Loading…
Reference in New Issue
Block a user