-
public class StringDiff
-
-
Field Summary
Fields Modifier and Type Field Description public final static StringDiffINSTANCE
-
Method Summary
Modifier and Type Method Description final static DiffResultdifferentMiddle(String s1, String s2)Takes two strings and returns the different middle section which could be Two empty strings (no difference)
an empty string and a non-empty string (a deletion or addition)
Two strings (the changed part).
-
-
Method Detail
-
differentMiddle
final static DiffResult differentMiddle(String s1, String s2)
Takes two strings and returns the different middle section which could be
Two empty strings (no difference)
an empty string and a non-empty string (a deletion or addition)
Two strings (the changed part).
This works by finding exact matches from the beginning and the end of the string, then returning everything inbetween.
-
-
-