- Sort Score
- Result 10 results
- Languages All
Results 11 - 16 of 16 for codePoint (0.03 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) -
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 Dec 26 11:42:13 UTC 2025 - Last Modified: Wed Dec 20 23:27:07 UTC 2023 - 931 bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/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 Dec 26 11:42:13 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 7.9K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/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 Dec 26 11:42:13 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 11.2K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/base/Utf8Test.java
utf8Lengths.put(MAX_CODE_POINT, 4); Integer[] codePoints = utf8Lengths.keySet().toArray(new Integer[] {}); StringBuilder sb = new StringBuilder(); Random rnd = new Random(); for (int trial = 0; trial < 100; trial++) { sb.setLength(0); int utf8Length = 0; for (int i = 0; i < 6; i++) { Integer randomCodePoint = codePoints[rnd.nextInt(codePoints.length)]; sb.appendCodePoint(randomCodePoint);
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-idna-mapping-table/src/main/kotlin/okhttp3/internal/idn/MappingTables.kt
if (mapping.hasSingleSourceCodePoint) { val sourceCodePoint = mapping.sourceCodePoint0 val mappedCodePoints = mapping.mappedTo .utf8() .codePoints() .toList() if (mappedCodePoints.size == 1) { val codePointDelta = mappedCodePoints.single() - sourceCodePoint if (MappedRange.InlineDelta.MAX_VALUE >= abs(codePointDelta)) {
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 8.3K bytes - Viewed (0)