- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 27 for IsSurrogate (0.28 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 Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 5.2K bytes - Viewed (0) -
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 Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 5.2K bytes - Viewed (0) -
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 Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 17 13:00:28 UTC 2024 - 7K bytes - Viewed (0) -
okhttp/src/main/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 Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Apr 03 03:04:50 UTC 2024 - 8.5K bytes - Viewed (0) -
internal/s3select/jstream/decoder.go
} // check for proceeding surrogate pair c = d.next() if !utf16.IsSurrogate(r) || c != '\\' { d.scratch.addRune(r) goto scan } if c = d.next(); c != 'u' { d.scratch.addRune(r) goto scan_esc } r2 := d.u4() if r2 < 0 { return "", d.mkError(ErrSyntax, "in unicode escape sequence") } // write surrogate pair d.scratch.addRune(utf16.DecodeRune(r, r2))
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 23 19:35:41 UTC 2024 - 13.5K bytes - Viewed (0) -
android/guava/src/com/google/common/escape/UnicodeEscaper.java
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jan 18 20:55:09 UTC 2022 - 13.2K 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 Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 8.6K 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 Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Sep 17 18:14:12 UTC 2024 - 10.4K bytes - Viewed (0) -
guava-testlib/src/com/google/common/escape/testing/EscaperAsserts.java
} /** * Asserts that a Unicode escaper escapes the given hi/lo surrogate pair into the expected string. * * @param escaper the non-null escaper to test * @param expected the expected output string * @param hi the high surrogate pair character * @param lo the low surrogate pair character */ public static void assertUnicodeEscaping(
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jan 18 20:55:09 UTC 2022 - 3.8K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/escape/testing/EscaperAsserts.java
} /** * Asserts that a Unicode escaper escapes the given hi/lo surrogate pair into the expected string. * * @param escaper the non-null escaper to test * @param expected the expected output string * @param hi the high surrogate pair character * @param lo the low surrogate pair character */ public static void assertUnicodeEscaping(
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jan 18 20:55:09 UTC 2022 - 3.8K bytes - Viewed (0)