MathUtilEditDistance Method (String, String, MathUtilEditDistanceOptions) | |
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release
Gets the Levenshtein or Damerau-Levenshtein edit distance between two strings.
Namespace:
Telogis.GeoBase
Assembly:
geobase.net (in geobase.net.dll) Version: 4.99.0.0
Syntax public static int EditDistance(
string stringA,
string stringB,
MathUtilEditDistanceOptions options
)
Public Shared Function EditDistance (
stringA As String,
stringB As String,
options As MathUtilEditDistanceOptions
) As Integer
Parameters
- stringA
- Type: SystemString
The first string to compare. - stringB
- Type: SystemString
The second string to compare. - options
- Type: Telogis.GeoBaseMathUtilEditDistanceOptions
Options controlling how the edit distance is calculated.
Return Value
Type:
Int32The Levenshtein or Damerau-Levenshtein edit distance. Returns -1 if one of the options is violated (for example, differing first characters when using
EditDistanceOptions.RequireFirstCharacterMatch), or if either of the input strings is empty.
See Also