Levenshtein distance: Difference between revisions

Content added Content deleted
Line 1,894: Line 1,894:
{{works with|Julia|1.0}}
{{works with|Julia|1.0}}
<lang julia>function levendist(s::AbstractString, t::AbstractString)
<lang julia>function levendist(s::AbstractString, t::AbstractString)
ls, lt = length(s), length(t)
ls, lt = length.((s, t))
ls == 0 && return lt
ls == 0 && return lt
lt == 0 && return ls
lt == 0 && return ls