Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for indexOfControlOrNonAscii (0.14 sec)

  1. okhttp/src/main/kotlin/okhttp3/Cookie.kt

          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
          var deltaSeconds = -1L
          var domain: String? = null
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Apr 06 04:12:05 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/-UtilCommon.kt

     * Returns the index of the first character in this string that is either a control character (like
     * `\u0000` or `\n`) or a non-ASCII character. Returns -1 if this string has no such characters.
     */
    internal fun String.indexOfControlOrNonAscii(): Int {
      for (i in 0 until length) {
        val c = this[i]
        if (c <= '\u001f' || c >= '\u007f') {
          return i
        }
      }
      return -1
    }
    
    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