- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 11 for isSurrogate (0.09 sec)
-
android/guava-tests/benchmark/com/google/common/hash/HashStringBenchmark.java
StringBuilder sb = new StringBuilder(); for (int j = 0; j < charCount; j++) { int codePoint; // discard illegal surrogate "codepoints" do { codePoint = rnd.nextInt(maxCodePoint.value); } while (Character.isSurrogate((char) codePoint)); sb.appendCodePoint(codePoint); } strings[i] = sb.toString(); } } @Benchmark
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Tue May 13 18:46:00 UTC 2025 - 5.3K bytes - Viewed (0) -
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/src/com/google/common/xml/XmlEscapers.java
* Specifically "\r" (carriage return) is preserved in the output, which may result in it being * silently converted to "\n" when the XML is parsed. * * <p>This escaper does not treat surrogate pairs specially and does not perform Unicode * validation on its input. */ public static Escaper xmlContentEscaper() { return XML_CONTENT_ESCAPER; } /**
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Fri Jun 20 17:15:33 UTC 2025 - 6.5K 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-tests/test/com/google/common/escape/UnicodeEscaperTest.java
// Build up a range of surrogate pair characters to test int min = Character.MIN_SUPPLEMENTARY_CODE_POINT; int max = Character.MAX_CODE_POINT; int range = max - min; int s1 = min + (1 * range) / 4; int s2 = min + (2 * range) / 4; int s3 = min + (3 * range) / 4; char[] dst = new char[12]; // Put surrogate pairs at odd indices so they can be split easily
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Tue May 13 18:46:00 UTC 2025 - 6K bytes - Viewed (0) -
guava-tests/test/com/google/common/escape/UnicodeEscaperTest.java
// Build up a range of surrogate pair characters to test int min = Character.MIN_SUPPLEMENTARY_CODE_POINT; int max = Character.MAX_CODE_POINT; int range = max - min; int s1 = min + (1 * range) / 4; int s2 = min + (2 * range) / 4; int s3 = min + (3 * range) / 4; char[] dst = new char[12]; // Put surrogate pairs at odd indices so they can be split easily
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Tue May 13 18:46:00 UTC 2025 - 6K 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) -
android/guava/src/com/google/common/base/Ascii.java
* for use with it (such as all-ASCII text) and for simple debugging text. When using this method, * consider the following: * * <ul> * <li>it may split surrogate pairs * <li>it may split characters and combining characters * <li>it does not consider word boundaries * <li>if truncating for display to users, there are other considerations that must be taken
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Mar 17 20:26:29 UTC 2025 - 21.7K 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)