- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for isSurrogate (0.04 sec)
-
android/guava/src/com/google/common/base/Utf8.java
utf8Length += (0x7f - c) >>> 31; // branch free! } else { utf8Length += 2; // We can't use Character.isSurrogate(c) here and below because of GWT. if (MIN_SURROGATE <= c && c <= MAX_SURROGATE) { // Check that we have a well-formed surrogate pair. if (Character.codePointAt(sequence, i) == c) { throw new IllegalArgumentException(unpairedSurrogateMsg(i)); }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Aug 11 19:31:30 UTC 2025 - 7K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/base/Utf8Test.java
MAX_LOW_SURROGATE, MAX_HIGH_SURROGATE, MIN_LOW_SURROGATE, MIN_HIGH_SURROGATE, }; for (char surrogate : surrogates) { builder.add(newString(surrogate)); builder.add(newString(surrogate, 'n')); builder.add(newString('n', surrogate)); builder.add(newString(surrogate, surrogate)); } builder.add(newString(MIN_LOW_SURROGATE, MAX_HIGH_SURROGATE)); ILL_FORMED_STRINGS = builder.build(); }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 12.8K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/base/StringsTest.java
assertEquals("abc", Strings.commonPrefix(new StringBuilder("abcdef"), "abcxyz")); // Identical valid surrogate pairs. assertEquals( "abc\uD8AB\uDCAB", Strings.commonPrefix("abc\uD8AB\uDCABdef", "abc\uD8AB\uDCABxyz")); // Differing valid surrogate pairs. assertEquals("abc", Strings.commonPrefix("abc\uD8AB\uDCABdef", "abc\uD8AB\uDCACxyz")); // One invalid pair.
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Wed Aug 27 17:53:41 UTC 2025 - 10.5K bytes - Viewed (0) -
android/guava/src/com/google/common/base/Strings.java
return new String(array); } /** * Returns the longest string {@code prefix} such that {@code a.toString().startsWith(prefix) && * b.toString().startsWith(prefix)}, taking care not to split surrogate pairs. If {@code a} and * {@code b} have no common prefix, returns the empty string. * * @since 11.0 */ public static String commonPrefix(CharSequence a, CharSequence b) { checkNotNull(a);
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Wed Aug 27 17:53:41 UTC 2025 - 12.2K bytes - Viewed (0) -
guava-tests/test/com/google/common/hash/HashTestUtils.java
} } /** * This verifies that putUnencodedChars(String) and hashUnencodedChars(String) are equivalent, * even for funny strings composed by (possibly unmatched, and mostly illegal) surrogate * characters. (But doesn't test that they do the right thing - just their consistency). */ private static void assertHashStringWithSurrogatesEquivalence( HashFunction hashFunction, Random random) {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Aug 11 19:31:30 UTC 2025 - 25.6K bytes - Viewed (0) -
android/guava/src/com/google/common/base/CharMatcher.java
* * <p>Supplementary characters are <a * href="https://docs.oracle.com/javase/8/docs/api/java/lang/Character.html#supplementary">encoded * into a {@code String} using surrogate pairs</a>, and a {@code CharMatcher} treats these just as * two separate characters. {@link #countIn} counts each supplementary character as 2 {@code char}s. *
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 53.9K bytes - Viewed (0)