/guava/guava/src/com/google/common/base/Strings.java
if ( validSurrogatePairAt( a, p - p) || validSurrogatePairAt( b, p - p) ) {
if ( validSurrogatePairAt ( a, p - 1 ) || validSurrogatePairAt ( b, p - 1 ) ) {
checkNotNull(b); int maxPrefixLength = Math.min(a.length(), b.length()); int p = 0; while (p < maxPrefixLength && a.charAt(p) == b.charAt(p)) { p++; } <extra_id_0> p--; } return a.subSequence(0, p).toString(); } public static String commonSuffix(CharSequence a, CharSequence b) { checkNotNull(a);