Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 19 of 19 for codePoint (0.16 sec)

  1. 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)
  2. 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 May 03 11:42:14 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 931 bytes
    - Viewed (0)
  3. 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.
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Jan 07 16:05:34 GMT 2024
    - 1.4K bytes
    - Viewed (0)
  4. okhttp/src/test/java/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)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.8K 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 May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 08 13:56:22 GMT 2021
    - 8.6K bytes
    - Viewed (0)
  6. 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)
  7. okhttp-idna-mapping-table/src/main/kotlin/okhttp3/internal/idn/MappingTables.kt

     */
    internal fun inlineDeltaOrNull(mapping: Mapping): MappedRange.InlineDelta? {
      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)) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 8.2K bytes
    - Viewed (0)
  8. 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 {
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Apr 10 14:11:51 GMT 2023
    - 7K bytes
    - Viewed (0)
  9. android/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 {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 10 14:11:51 GMT 2023
    - 7K bytes
    - Viewed (0)
Back to top