Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for isAscii (0.17 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/tls/OkHostnameVerifier.kt

       */
      private fun String.asciiToLowercase(): String {
        return when {
          isAscii() -> lowercase(Locale.US) // This is an ASCII string.
          else -> this
        }
      }
    
      /** Returns true if the [String] is ASCII encoded (0-127). */
      private fun String.isAscii() = length == utf8Size().toInt()
    
      /**
       * Returns true if [hostname] matches the domain name [pattern].
       *
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Apr 15 14:55:09 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  2. src/bytes/bytes.go

    // their upper case.
    func ToUpper(s []byte) []byte {
    	isASCII, hasLower := true, false
    	for i := 0; i < len(s); i++ {
    		c := s[i]
    		if c >= utf8.RuneSelf {
    			isASCII = false
    			break
    		}
    		hasLower = hasLower || ('a' <= c && c <= 'z')
    	}
    
    	if isASCII { // optimize for ASCII-only byte slices.
    		if !hasLower {
    			// Just return a copy.
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Mon Feb 19 19:51:15 GMT 2024
    - 33.8K bytes
    - Viewed (0)
  3. src/archive/tar/strconv.go

    	"strconv"
    	"strings"
    	"time"
    )
    
    // hasNUL reports whether the NUL character exists within s.
    func hasNUL(s string) bool {
    	return strings.Contains(s, "\x00")
    }
    
    // isASCII reports whether the input is an ASCII C-style string.
    func isASCII(s string) bool {
    	for _, c := range s {
    		if c >= 0x80 || c == 0x00 {
    			return false
    		}
    	}
    	return true
    }
    
    // toASCII converts the input to an ASCII C-style string.
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Tue Aug 01 14:28:42 GMT 2023
    - 9K bytes
    - Viewed (0)
  4. src/archive/tar/reader.go

    			// See https://golang.org/issues/21005
    			if p2.err != nil {
    				hdr.AccessTime, hdr.ChangeTime = time.Time{}, time.Time{}
    				ustar := tr.blk.toUSTAR()
    				if s := p.parseString(ustar.prefix()); isASCII(s) {
    					prefix = s
    				}
    				hdr.Format = FormatUnknown // Buggy file is not GNU
    			}
    		}
    		if len(prefix) > 0 {
    			hdr.Name = prefix + "/" + hdr.Name
    		}
    	}
    	return hdr, &tr.blk, p.err
    }
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Mar 08 01:59:14 GMT 2024
    - 26.8K bytes
    - Viewed (0)
  5. src/archive/tar/writer.go

    // If the path is not splittable, then it will return ("", "", false).
    func splitUSTARPath(name string) (prefix, suffix string, ok bool) {
    	length := len(name)
    	if length <= nameSize || !isASCII(name) {
    		return "", "", false
    	} else if length > prefixSize+1 {
    		length = prefixSize + 1
    	} else if name[length-1] == '/' {
    		length--
    	}
    
    	i := strings.LastIndex(name[:length], "/")
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Oct 13 18:36:46 GMT 2023
    - 19.6K bytes
    - Viewed (0)
  6. src/archive/tar/common.go

    		allowLongGNU := paxKey == paxPath || paxKey == paxLinkpath
    		if hasNUL(s) || (tooLong && !allowLongGNU) {
    			whyNoGNU = fmt.Sprintf("GNU cannot encode %s=%q", name, s)
    			format.mustNotBe(FormatGNU)
    		}
    		if !isASCII(s) || tooLong {
    			canSplitUSTAR := paxKey == paxPath
    			if _, _, ok := splitUSTARPath(s); !canSplitUSTAR || !ok {
    				whyNoUSTAR = fmt.Sprintf("USTAR cannot encode %s=%q", name, s)
    				format.mustNotBe(FormatUSTAR)
    			}
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Mar 15 16:01:50 GMT 2024
    - 24.7K bytes
    - Viewed (2)
  7. okhttp-android/src/main/baseline-prof.txt

    HSPLokhttp3/internal/tls/OkHostnameVerifier;->getSubjectAltNames(Ljava/security/cert/X509Certificate;I)Ljava/util/List;
    HSPLokhttp3/internal/tls/OkHostnameVerifier;->isAscii(Ljava/lang/String;)Z
    HSPLokhttp3/internal/tls/OkHostnameVerifier;->verify(Ljava/lang/String;Ljava/security/cert/X509Certificate;)Z
    HSPLokhttp3/internal/tls/OkHostnameVerifier;->verify(Ljava/lang/String;Ljavax/net/ssl/SSLSession;)Z
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Mar 21 11:22:00 GMT 2022
    - 127.9K bytes
    - Viewed (0)
Back to top