function

levenshtein . string . sncode

VERSIONlatest Return the distance between 2 strings.

levenshtein(1e)

NAME

levenshtein - Return the distance between 2 strings.

SYNOPSIS

levenshtein(string1,string2)

DESCRIPTION

From Wikipedia: In information theory and computer science, the Levenshtein distance is a string metric for measuring the difference between two sequences. Informally, the Levenshtein distance between two words is the minimum number of single-character edits (i.e. insertions, deletions or substitutions) required to change one word into the other. It is named after Vladimir Levenshtein, who considered this distance in 1965.[1] Levenshtein distance may also be referred to as edit distance, although that may also denote a larger family of distance metrics.[2]:32 It is closely related to pairwise string alignments.

RETURN

Return an integer.

EXAMPLES

            levenshtein("extenso","extenso");

            levenshtein("extenso","extens0");

            levenshtein("extenso","exten50");

            levenshtein("extenso","exte350");

            levenshtein("extenso","ext4350");

            levenshtein("extenso","ex54350");

            levenshtein("extenso","e654350");

            levenshtein("extenso","7654350");

            levenshtein("extenso","87654350");

return 012345678

AUTHOR

Written by <laplante@sednove.com>