code: public static int indexOfDifference(final String a, final String b) {
          if (N.equals(a, b) || (N.isNullOrEmpty(a) && N.isNullOrEmpty(b))) {
              return N.INDEX_NOT_FOUND;
          }
  
          if (N.isNullOrEmpty(a) || N.isNullOrEmpty(b)) {
              return 0;
          }
  
          int i = 0;
          for (int len = N.min(a.length(), b.length()); i < len; i++) {
              if (a.charAt(i) != b.charAt(i)) {
                  break;
              }
          }
  
          if (i < b.length() || i < a.length()) {
              return i;
          }
  
          return N.INDEX_NOT_FOUND;
      }
docs: <p>
  Compares two Strings, and returns the index at which the Stringss begin
  to differ.
  </p>
  
  <p>
  For example,
  {@code indexOfDifference("i am a machine", "i am a robot") -> 7}
  </p>
  
  <pre>
  N.indexOfDifference(null, null) = -1
  N.indexOfDifference("", "") = -1
  N.indexOfDifference("", "abc") = 0
  N.indexOfDifference("abc", "") = 0
  N.indexOfDifference("abc", "abc") = -1
  N.indexOfDifference("ab", "abxyz") = 2
  N.indexOfDifference("abcde", "abxyz") = 2
  N.indexOfDifference("abcde", "xyz") = 0
  </pre>
  
  @param a
  the first String, may be null
  @param b
  the second String, may be null
  @return the index where cs1 and cs2 begin to differ; -1 if they are equal