Instance Methodfwcd.swift-utils 4.6.2Utils->Swift
lcsDistance(to:caseSensitive:)
The Longest Common Subsequence (LCS) string distance, i.e. the minimal number of insertions and deletions to transform this string to the given string.
func lcsDistance<S>(to rhs: S, caseSensitive: Bool = true) -> Int where S : StringProtocol
This distance is equivalent to self.count + rhs.count
minus the length of the LCS between self
and rhs
.