Skip to main content Skip to complementary content

LevenshteinDist - script and chart function

LevenshteinDist() returns the Levenshtein distance between two strings. It is defined as the minimum number of single-character edits (insertions, deletions, or substitutions) required to change one string into the other. The function is useful for fuzzy string comparisons.

Syntax:  

LevenshteinDist(text1, text2)

Return data type: integer

Arguments
Argument Description
text1 The first string.
text2 The second string which will be compared to the first string in order to calculate the minimum number of single-character edits.
Example: Chart expression
Example Result
LevenshteinDist( 'Kitten','Sitting' ) Returns 3

Example - LevenshteinDist fundamentals

Example - LevenshteinDist scenario

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!