- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 30 for codepoint (0.16 sec)
-
okhttp/src/main/kotlin/okhttp3/internal/idn/IdnaMappingTable.kt
val sections: String, val ranges: String, val mappings: String, ) { /** * Returns true if the [codePoint] was applied successfully. Returns false if it was disallowed. */ fun map( codePoint: Int, sink: BufferedSink, ): Boolean { val sectionsIndex = findSectionsIndex(codePoint) val rangesPosition = sections.read14BitInt(sectionsIndex + 2) val rangesLimit = when {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Tue Apr 02 11:39:58 UTC 2024 - 9K bytes - Viewed (0) -
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) -
okhttp-testing-support/src/main/kotlin/okhttp3/TestUtilCommon.kt
import okio.Buffer import okio.Path import okio.Path.Companion.toPath val okHttpRoot: Path get() = getEnv("OKHTTP_ROOT")!!.toPath() fun String(vararg codePoints: Int): String { val buffer = Buffer() for (codePoint in codePoints) { buffer.writeUtf8CodePoint(codePoint) } return buffer.readUtf8()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Dec 20 23:27:07 UTC 2023 - 931 bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/FormBodyTest.kt
assertThat(formEncode(255)).isEqualTo("%C3%BF") } @Throws(IOException::class) private fun formEncode(codePoint: Int): String { // Wrap the codepoint with regular printable characters to prevent trimming. val body = FormBody.Builder() .add("a", String(intArrayOf('b'.code, codePoint, 'c'.code), 0, 3)) .build() val buffer = Buffer() body.writeTo(buffer)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 7.8K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/-HostnamesCommon.kt
val bufferA = Buffer().writeUtf8(host) val bufferB = Buffer() // 1. Map, from bufferA to bufferB. while (!bufferA.exhausted()) { val codePoint = bufferA.readUtf8CodePoint() if (!IDNA_MAPPING_TABLE.map(codePoint, bufferB)) return null } // 2. Normalize, from bufferB to bufferA. val normalized = normalizeNfc(bufferB.readUtf8()) bufferA.writeUtf8(normalized)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 11.2K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/hash/Murmur3Hash32Test.java
for (int z = 0; z < 100; z++) { int[] codePoints = new int[rng.nextInt(8)]; for (int i = 0; i < codePoints.length; i++) { do { codePoints[i] = rng.nextInt(0x800); } while (!Character.isValidCodePoint(codePoints[i]) || (codePoints[i] >= Character.MIN_SURROGATE && codePoints[i] <= Character.MAX_SURROGATE)); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:29:46 UTC 2024 - 8.3K bytes - Viewed (0) -
android/guava/src/com/google/common/escape/UnicodeEscaper.java
} return new String(dest, 0, destIndex); } /** * Returns the Unicode code point of the character at the given index. * * <p>Unlike {@link Character#codePointAt(CharSequence, int)} or {@link String#codePointAt(int)} * this method will never fail silently when encountering an invalid surrogate pair. * * <p>The behaviour of this method is as follows: * * <ol>
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jan 18 20:55:09 UTC 2022 - 13.2K bytes - Viewed (0) -
guava/src/com/google/common/base/Utf8.java
if (byte2 > (byte) 0xBF // Overlong? 5 most significant bits must not all be zero. || (byte1 == (byte) 0xE0 && byte2 < (byte) 0xA0) // Check for illegal surrogate codepoints. || (byte1 == (byte) 0xED && (byte) 0xA0 <= byte2) // Third byte trailing-byte test. || bytes[index++] > (byte) 0xBF) { return false; } } else {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 17 13:00:28 UTC 2024 - 7K bytes - Viewed (0) -
guava-testlib/src/com/google/common/escape/testing/EscaperAsserts.java
* @param lo the low surrogate pair character */ public static void assertUnicodeEscaping( UnicodeEscaper escaper, String expected, char hi, char lo) { int cp = Character.toCodePoint(hi, lo); String escaped = computeReplacement(escaper, cp); Assert.assertNotNull(escaped); Assert.assertEquals(expected, escaped); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jan 18 20:55:09 UTC 2022 - 3.8K bytes - Viewed (0)