code: public static int reverseIndexOfDifference(final CharSequence cs1, final CharSequence cs2) {
          if (cs1 == cs2) {
              return StringUtils.INDEX_NOT_FOUND;
          }
          if (cs1 == null || cs2 == null) {
              return 0;
          }
          int i;
          int cs1Length = cs1.length();
          int cs2Length = cs2.length();
  
          for (i = 0; i < cs1Length && i < cs2Length; ++i) {
              if (cs1.charAt(cs1Length - i - 1) != cs2.charAt(cs2Length - i - 1)) {
                  break;
              }
          }
          if (i < cs2Length || i < cs1Length) {
              return i;
          }
          return StringUtils.INDEX_NOT_FOUND;
      }
docs: <p>Compares two CharSequences, and returns the index beginning from the behind,
  at which the CharSequences begin to differ.</p>
  
  Based on {@link StringUtils#indexOfDifference}
  
  <p>For example,
  {@code reverseIndexOfDifference("you are a machine", "i have one machine") -> 8}</p>
  
  <pre>
  reverseIndexOfDifference(null, null) = -1
  reverseIndexOfDifference("", "") = -1
  reverseIndexOfDifference("", "abc") = 0
  reverseIndexOfDifference("abc", "") = 0
  reverseIndexOfDifference("abc", "abc") = -1
  reverseIndexOfDifference("ab", "xyzab") = 2
  reverseIndexOfDifference("abcde", "xyzab") = 2
  reverseIndexOfDifference("abcde", "xyz") = 0
  </pre>
  
  @param cs1  the first CharSequence, may be null
  @param cs2  the second CharSequence, may be null
  @return the index from behind where cs1 and cs2 begin to differ; -1 if they are equal