Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for mergeAdjacentRanges (0.18 sec)

  1. okhttp-idna-mapping-table/src/test/kotlin/okhttp3/internal/idn/MappingTablesTest.kt

        assertThat(
          mergeAdjacentRanges(
            listOf(
              Mapping(0x0000, 0x002c, TYPE_DISALLOWED_STD3_VALID, ByteString.EMPTY),
            ),
          ),
        ).containsExactly(
          Mapping(0x0000, 0x002c, TYPE_VALID, ByteString.EMPTY),
        )
      }
    
      @Test fun simplifyCombinesCanonicalEquivalent() {
        assertThat(
          mergeAdjacentRanges(
            listOf(
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.3K bytes
    - Viewed (0)
  2. okhttp-idna-mapping-table/src/main/kotlin/okhttp3/internal/idn/MappingTables.kt

    import kotlin.streams.toList
    import okio.Buffer
    
    /** Index [table] for compactness as specified by `IdnaMappingTable`. */
    fun buildIdnaMappingTableData(table: SimpleIdnaMappingTable): IdnaMappingTableData {
      val simplified = mergeAdjacentRanges(table.mappings)
      val withoutSectionSpans = withoutSectionSpans(simplified)
      val sections = sections(withoutSectionSpans)
    
      val rangesBuffer = Buffer()
      val mappingsBuffer = StringBuilder()
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 8.2K bytes
    - Viewed (0)
Back to top