- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 12 for isSurrogate (0.15 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 Dec 26 12:43:10 UTC 2025 - Last Modified: Tue May 13 18:46:00 UTC 2025 - 5.3K 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 Dec 26 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 12.8K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/idn/Punycode.kt
pos: Int, limit: Int, ): List<Int> { val result = mutableListOf<Int>() var i = pos while (i < limit) { val c = this[i] result += when { c.isSurrogate() -> { val low = (if (i + 1 < limit) this[i + 1] else '\u0000') if (c.isLowSurrogate() || !low.isLowSurrogate()) { '?'.code } else { i++Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Fri Dec 27 13:39:56 UTC 2024 - 8.5K bytes - Viewed (0) -
android/guava/src/com/google/common/escape/ArrayBasedUnicodeEscaper.java
// into the range of surrogate characters, but if they do we must not test // any values in that range. To see why, consider the case where: // safeMin <= {hi,lo} <= safeMax // where {hi,lo} are characters forming a surrogate pair such that: // codePointOf(hi, lo) > safeMax // which would result in the surrogate pair being (wrongly) considered safe.Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Thu Feb 13 15:45:16 UTC 2025 - 8.5K bytes - Viewed (0) -
android/guava/src/com/google/common/escape/UnicodeEscaper.java
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Thu Feb 13 15:45:16 UTC 2025 - 13.2K 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 Dec 26 12:43:10 UTC 2025 - Last Modified: Thu Sep 11 17:06:34 UTC 2025 - 6.4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/escape/ArrayBasedUnicodeEscaperTest.java
}; EscaperAsserts.assertBasic(surrogateEscaper); // A surrogate pair defining a code point within the safe range. String safeInput = "\uD800\uDC00"; // 0x10000 assertThat(surrogateEscaper.escape(safeInput)).isEqualTo(safeInput); // A surrogate pair defining a code point outside the safe range (but both // of the surrogate characters lie within the safe range). It is importantRegistered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Feb 18 15:41:04 UTC 2025 - 5.2K bytes - Viewed (0) -
guava-tests/test/com/google/common/xml/XmlEscapersTest.java
} } else { // and everything else is replaced with FFFD. assertEscaping(xmlEscaper, "\uFFFD", ch); } } // Test _all_ allowed characters (including surrogate values). for (char ch = 0x20; ch <= 0xFFFD; ch++) { // There are a small number of cases to consider, so just do it manually. if (ch == '&') { assertEscaping(xmlEscaper, "&", ch);Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Fri Dec 05 22:03:28 UTC 2025 - 4.8K 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 Dec 26 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 Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Oct 28 18:19:59 UTC 2025 - 25.6K bytes - Viewed (0)