Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for isProbablyUtf8 (0.05 sec)

  1. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/IsProbablyUtf8.kt

     * signatures.
     *
     * @param codePointLimit the number of code points to read in order to make a decision.
     */
    internal fun BufferedSource.isProbablyUtf8(codePointLimit: Long = Long.MAX_VALUE): Boolean {
      try {
        val peek = peek()
        for (i in 0 until codePointLimit) {
          if (peek.exhausted()) {
            break
          }
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Mon Oct 06 22:47:06 UTC 2025
    - 1.4K bytes
    - Viewed (0)
  2. okhttp/src/commonTest/kotlin/okhttp3/internal/IsProbablyUtf8Test.kt

    class IsProbablyUtf8Test {
      @Test fun isProbablyUtf8() {
        assertThat(Buffer().isProbablyUtf8(16L)).isTrue()
        assertThat(Buffer().writeUtf8("abc").isProbablyUtf8(16L)).isTrue()
        assertThat(Buffer().writeUtf8("new\r\nlines").isProbablyUtf8(16L)).isTrue()
        assertThat(Buffer().writeUtf8("white\t space").isProbablyUtf8(16L)).isTrue()
        assertThat(Buffer().writeUtf8("Слава Україні!").isProbablyUtf8(16L)).isTrue()
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Mon Oct 06 22:47:06 UTC 2025
    - 2.4K bytes
    - Viewed (0)
Back to top