distance

fun distance(first: String, second: String): Int

Compute the distance between strings: the minimum number of operations needed to transform one string into the other (insertion, deletion, substitution of a single character, or a transposition of two adjacent characters) while no substring is edited more than once.

Parameters

first

the first string to compare.

second

the second string to compare.