public static int commonSuffixLength(CharSequence s1, CharSequence s2) {
    int s1Length = s1.length();
    int s2Length = s2.length();
    int maxCommonLength = Math.min(s1Length, s2Length);
    for (int i = 0; i < maxCommonLength; ++i) {
      if (s1.charAt(s1Length - 1 - i) != s2.charAt(s2Length - 1 - i)) {
        return i;
      }
    }
    return maxCommonLength;
  }
public static int commonSuffixLength(CharSequence s1, CharSequence s2)