StringUtils.Levenshtein method

Version 1.1.28
.NET Framework 4.8
Namespace Skybrud.Essentials.Strings
Assembly Skybrud.Essentials.dll

Levenshtein(string, string)

Static

Computes the Levenshtein distance between two strings.

The Levenshtein distance is defined as the minimal number of characters you have to replace, insert or delete to transform s into t.

public static int Levenshtein(string s, string t)

Parameters

s String

The first string.

t String

The second string.

Returns

int

The Levenshtein distance between s into t.