Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Function

levenshtein — Levenshtein distance

Synopsis

levenshtein(a: string, b: string) -> int64

Description

The levenshtein function computes the Levenshtein distance between strings a and b.

Examples


# spq
values levenshtein(a, b)
# input
{a:"kitten",b:"sitting"}
# expected output
3