Merge pull request #5 from bannzai/enhancement/performance/index Turun up for diff function
Merge pull request #5 from bannzai/enhancement/performance/index
Turun up for diff function
Swdifft is string diff library of longest common subsequence.
Using diff function, Swdifft marked diff between left and right.
let result = diff("ABCDEFGHIJ", "ABCDEFG") print(result.lhs) // ABCDEFG`HIJ` print(result.rhs) // ABCDEFG
If it reversed.
let result = diff("ABCDEFG", "ABCDEFGHIJ") print(result.lhs) // ABCDEFG print(result.rhs) // ABCDEFG*HIJ*
And it can be print diff.
printDiff("ABCDEFGHIJ", "ABCDEFG")
Result.
ABCDEFG`HIJ` ABCDEFG
Swdifft marked symbol’s, when string matches the difference. The mark can customize from default setting to use these global variables.
beginLHSMark = "%" // Default is ` endLHSMark = "%" // Default is ` beginRHSMark = "&" // Default is * endRHSMark = "&" // Default is *
Swdifft is released under the MIT license. See LICENSE for details.
Swdifft
Swdifft is string diff library of longest common subsequence.
Usage
Using diff function, Swdifft marked diff between left and right.
If it reversed.
And it can be print diff.
Result.
Swdifft marked symbol’s, when string matches the difference. The mark can customize from default setting to use these global variables.
LICENSE
Swdifft is released under the MIT license. See LICENSE for details.