Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 19 for codePoints (0.12 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 12.3K 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)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  8. 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)
  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
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  10. 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)
Back to top