Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 35 for codepoint (0.2 sec)

  1. 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,
      ) {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.5K bytes
    - Viewed (0)
  2. 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
        ) {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Tue Jan 09 12:33:05 GMT 2024
    - 7.3K bytes
    - Viewed (0)
  3. 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)
          }
        }
      }
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.8K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/UrlComponentEncodingTester.kt

              continue
            }
            testEncodeAndDecode(codePoint, codePointString, component)
            if (encoding == Encoding.SKIP) continue
            testParseOriginal(codePoint, codePointString, encoding, component)
            testParseAlreadyEncoded(codePoint, encoding, component)
    
            val platform = urlComponentEncodingTesterJvmPlatform(component)
            platform.test(codePoint, codePointString, encoding, component)
          }
        }
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 12.3K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/internal/idn/IdnStringprep.kt

          val codePoint = validateBuffer.readUtf8CodePoint()
          if (codePoint in prohibitSet) return null
    
          if (first) {
            firstIsRandalcat = codePoint in randalcatSet
          } else if (firstIsRandalcat) {
            // 'If a string contains any RandALCat character, the string MUST NOT contain any LCat
            // character.'
            if (codePoint in lcatSet) return null
    
    Plain Text
    - Registered: Fri Mar 29 11:42:11 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.2K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/hash/Murmur3_32HashFunction.java

      private static long codePointToFourUtf8Bytes(int codePoint) {
        // codePoint has at most 21 bits
        return ((0xFL << 4) | (codePoint >>> 18))
            | ((0x80L | (0x3F & (codePoint >>> 12))) << 8)
            | ((0x80L | (0x3F & (codePoint >>> 6))) << 16)
            | ((0x80L | (0x3F & codePoint)) << 24);
      }
    
      private static long charToThreeUtf8Bytes(char c) {
        return ((0x7L << 5) | (c >>> 12))
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Jun 15 20:59:00 GMT 2022
    - 11.9K bytes
    - Viewed (0)
  7. 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)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 8.9K bytes
    - Viewed (0)
  8. 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) {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Apr 03 03:04:50 GMT 2024
    - 8.5K bytes
    - Viewed (0)
  9. 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
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 5.3K bytes
    - Viewed (0)
  10. 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
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 5.3K bytes
    - Viewed (0)
Back to top