Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for codePoint (0.57 sec)

  1. 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 May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 03 03:04:50 GMT 2024
    - 8.5K bytes
    - Viewed (0)
  2. 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
            }
          }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.8K bytes
    - Viewed (0)
  3. 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)
  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)
          }
        }
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.8K bytes
    - Viewed (0)
  5. 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 May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.5K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/-HostnamesCommon.kt

      val bufferA = Buffer().writeUtf8(host)
      val bufferB = Buffer()
    
      // 1. Map, from bufferA to bufferB.
      while (!bufferA.exhausted()) {
        val codePoint = bufferA.readUtf8CodePoint()
        if (!IDNA_MAPPING_TABLE.map(codePoint, bufferB)) return null
      }
    
      // 2. Normalize, from bufferB to bufferA.
      val normalized = normalizeNfc(bufferB.readUtf8())
      bufferA.writeUtf8(normalized)
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.2K bytes
    - Viewed (0)
  7. 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 May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 12.3K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/internal/idn/StringprepReader.kt

    }
    
    class MappingListCodePointMapping(
      val mappings: Map<Int, String>,
    ) : CodePointMapping {
      override fun get(codePoint: Int) = mappings[codePoint]
    }
    
    class RangeListCodePointSet(
      val ranges: List<IntRange>,
    ) : CodePointSet {
      override fun contains(codePoint: Int) = ranges.any { codePoint in it }
    Plain Text
    - Registered: Fri Mar 29 11:42:11 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.8K bytes
    - Viewed (0)
  9. 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 May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 09 12:33:05 GMT 2024
    - 7.3K bytes
    - Viewed (0)
  10. 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 May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 8.9K bytes
    - Viewed (0)
Back to top