Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for trimSubstring (0.07 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/ws/WebSocketExtensions.kt

                    val equals = header.delimiterOffset('=', pos, parameterEnd)
                    val name = header.trimSubstring(pos, equals)
                    val value =
                      if (equals < parameterEnd) {
                        header.trimSubstring(equals + 1, parameterEnd).removeSurrounding("\"")
                      } else {
                        null
                      }
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  2. okhttp-java-net-cookiejar/src/main/kotlin/okhttp3/java/net/cookiejar/JavaNetCookieJar.kt

          val equalsSign = header.delimiterOffset('=', pos, pairEnd)
          val name = header.trimSubstring(pos, equalsSign)
          if (name.startsWith("$")) {
            pos = pairEnd + 1
            continue
          }
    
          // We have either name=value or just a name.
          var value =
            if (equalsSign < pairEnd) {
              header.trimSubstring(equalsSign + 1, pairEnd)
            } else {
              ""
            }
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Apr 06 04:10:43 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/Cookie.kt

          if (pairEqualsSign == cookiePairEnd) return null
    
          val cookieName = setCookie.trimSubstring(endIndex = pairEqualsSign)
          if (cookieName.isEmpty() || cookieName.indexOfControlOrNonAscii() != -1) return null
    
          val cookieValue = setCookie.trimSubstring(pairEqualsSign + 1, cookiePairEnd)
          if (cookieValue.indexOfControlOrNonAscii() != -1) return null
    
          var expiresAt = MAX_DATE
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Apr 06 04:12:05 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/-UtilCommon.kt

          '\t', '\n', '\u000C', '\r', ' ' -> Unit
          else -> return i + 1
        }
      }
      return startIndex
    }
    
    /** Equivalent to `string.substring(startIndex, endIndex).trim()`. */
    fun String.trimSubstring(
      startIndex: Int = 0,
      endIndex: Int = length,
    ): String {
      val start = indexOfFirstNonAsciiWhitespace(startIndex, endIndex)
      val end = indexOfLastNonAsciiWhitespace(start, endIndex)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon May 13 13:42:37 UTC 2024
    - 11K bytes
    - Viewed (0)
Back to top