1.4.1 release #10

Merged
Infendro merged 8 commits from develop into main 2026-01-29 16:48:33 +00:00
Showing only changes of commit 87e6e65809 - Show all commits

View File

@@ -3,7 +3,13 @@ package com.infendro.cli.util
internal const val threshold = 2
/**
* Damerau-Levenshtein string distance
* Calculates the Damerau-Levenshtein distance between two strings.
*
* The distance is the minimum number of operations (insertion, deletion, substitution, and transposition) required to transform one string into another.
*
* @param a The source string.
* @param b The target string.
* @return The minimum number of operations to transform [a] into [b].
*/
internal fun distance(a: String, b: String): Int {
if (a == b) return 0