- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 15 for codePoint (0.06 sec)
-
okhttp/src/test/java/okhttp3/UrlComponentEncodingTesterJvm.kt
codePointString: String, encoding: UrlComponentEncodingTester.Encoding, component: Component, ) { testToUrl(codePoint, encoding, component) testFromUrl(codePoint, encoding, component) testUri(codePoint, codePointString, encoding, component) } private fun testToUrl( codePoint: Int, encoding: UrlComponentEncodingTester.Encoding, component: Component, ) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 5.5K bytes - Viewed (0) -
okhttp-idna-mapping-table/src/main/kotlin/okhttp3/internal/idn/GenerateIdnaMappingTableCode.kt
*/ fun String.escapeDataString(): String { return buildString { for (codePoint in this@escapeDataString.codePoints()) { when (codePoint) { in 0..0x20, '"'.code, '$'.code, '\\'.code, 'ยท'.code, 127, -> append(String.format("\\u%04x", codePoint)) else -> appendCodePoint(codePoint) } } }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 2.8K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/url/-Url.kt
charset: Charset? = null, ): String { var codePoint: Int var i = pos while (i < limit) { codePoint = codePointAt(i) if (codePoint < 0x20 || codePoint == 0x7f || codePoint >= 0x80 && !unicodeAllowed || codePoint.toChar() in encodeSet || codePoint == '%'.code && (!alreadyEncoded || strict && !isPercentEncoded(i, limit)) || codePoint == '+'.code && plusIsSpace ) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Tue Jan 09 12:33:05 UTC 2024 - 7.3K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/idn/Punycode.kt
} bias = adapt(i - oldi, codePoints.size + 1, oldi == 0) val deltaN = i / (codePoints.size + 1) if (n > Int.MAX_VALUE - deltaN) return false // Prevent overflow. n += deltaN i %= (codePoints.size + 1) if (n > 0x10ffff) return false // Not a valid code point. codePoints.add(i, n) i++ } for (codePoint in codePoints) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Apr 03 03:04:50 UTC 2024 - 8.5K bytes - Viewed (0) -
okhttp-idna-mapping-table/src/main/kotlin/okhttp3/internal/idn/SimpleIdnaMappingTable.kt
) { /** * Returns true if the [codePoint] was applied successfully. Returns false if it was disallowed. */ fun map( codePoint: Int, sink: BufferedSink, ): Boolean { val index = mappings.binarySearch { when { it.sourceCodePoint1 < codePoint -> -1 it.sourceCodePoint0 > codePoint -> 1 else -> 0 } }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 6.8K bytes - Viewed (0) -
okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/internal/IsProbablyUtf8.kt
copyTo(prefix, 0, byteCount) for (i in 0 until 16) { if (prefix.exhausted()) { break } val codePoint = prefix.readUtf8CodePoint() if (Character.isISOControl(codePoint) && !Character.isWhitespace(codePoint)) { return false } } return true } catch (_: EOFException) { return false // Truncated UTF-8 sequence. }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Jan 07 16:05:34 UTC 2024 - 1.4K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/idn/IdnaMappingTableTest.kt
private fun String.map(): String { val buffer = Buffer() for (codePoint in codePoints()) { require(table.map(codePoint, buffer)) } return buffer.readUtf8() } private fun String.mapExpectingErrors(): String { val buffer = Buffer() var errorCount = 0 for (codePoint in codePoints()) { if (!table.map(codePoint, buffer)) errorCount++ } assertThat(errorCount).isGreaterThan(0)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 8.9K bytes - Viewed (0) -
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)