levenshteinDistanceAndPath

fnTuple!(size_t, EditOp[]) levenshteinDistanceAndPath(alias equals = (a, b) => a == b, Range1, Range2)(Range1 s, Range2 t) if (isForwardRange!(Range1) && isForwardRange!(Range2))

Returns the Levenshtein distance and the edit path between s and t.

Parameters

equalsThe binary predicate to compare the elements of the two ranges.
sThe original range.
tThe transformation target

Returns

Tuple with the first element being the minimal amount of edits to transform s into t and

the second element being the sequence of edits to effect this transformation.

Allocates GC memory for the returned EditOp[] array.

fnTuple!(size_t, EditOp[]) levenshteinDistanceAndPath(alias equals = (a, b) => a == b, Range1, Range2)(auto ref Range1 s, auto ref Range2 t) if (isConvertibleToString!Range1 || isConvertibleToString!Range2)

ditto