Package 

Object StringDiff

    • Field Summary

      Fields 
      Modifier and Type Field Description
      public final static StringDiff INSTANCE
    • Method Summary

      Modifier and Type Method Description
      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.
      • Methods inherited from class org.organicdesign.testUtils.string.StringDiff

        equals, hashCode, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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.