Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 24 for codePoints (0.18 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. guava-tests/test/com/google/common/hash/Murmur3Hash32Test.java

        for (int z = 0; z < 100; z++) {
          String str;
          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));
          }
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 08 13:56:22 GMT 2021
    - 8.6K bytes
    - Viewed (0)
  3. 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()
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 931 bytes
    - Viewed (0)
  4. 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)
  5. android/guava-tests/test/com/google/common/hash/Murmur3Hash32Test.java

        for (int z = 0; z < 100; z++) {
          String str;
          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));
          }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 08 13:56:22 GMT 2021
    - 8.6K bytes
    - Viewed (0)
  6. 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)
  7. okhttp/src/test/java/okhttp3/UrlComponentEncodingTester.kt

        apply {
          for (i in 0..127) {
            encodings[i] = encoding
          }
        }
    
      fun override(
        encoding: Encoding,
        vararg codePoints: Int,
      ) = apply {
        for (codePoint in codePoints) {
          encodings[codePoint] = encoding
        }
      }
    
      fun nonPrintableAscii(encoding: Encoding) =
        apply {
          encodings[ 0x0] = encoding // Null character
    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)
  8. 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)
  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