Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for isHex (0.04 sec)

  1. src/html/template/css.go

    		}
    		// https://www.w3.org/TR/css3-syntax/#SUBTOK-escape
    		// escape ::= unicode | '\' [#x20-#x7E#x80-#xD7FF#xE000-#xFFFD#x10000-#x10FFFF]
    		if isHex(s[1]) {
    			// https://www.w3.org/TR/css3-syntax/#SUBTOK-unicode
    			//   unicode ::= '\' [0-9a-fA-F]{1,6} wc?
    			j := 2
    			for j < len(s) && j < 7 && isHex(s[j]) {
    				j++
    			}
    			r := hexDecode(s[1:j])
    			if r > unicode.MaxRune {
    				r, j = r/16, j-1
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 02 19:38:18 UTC 2023
    - 7K bytes
    - Viewed (0)
  2. src/mime/mediatype.go

    	// Count %, check that they're well-formed.
    	percents := 0
    	for i := 0; i < len(s); {
    		if s[i] != '%' {
    			i++
    			continue
    		}
    		percents++
    		if i+2 >= len(s) || !ishex(s[i+1]) || !ishex(s[i+2]) {
    			s = s[i:]
    			if len(s) > 3 {
    				s = s[0:3]
    			}
    			return "", fmt.Errorf("mime: bogus characters after %%: %q", s)
    		}
    		i += 3
    	}
    	if percents == 0 {
    		return s, nil
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 9.8K bytes
    - Viewed (0)
  3. src/html/template/url.go

    		// created by URI producers
    		case '-', '.', '_', '~':
    			continue
    		case '%':
    			// When normalizing do not re-encode valid escapes.
    			if norm && i+2 < len(s) && isHex(s[i+1]) && isHex(s[i+2]) {
    				continue
    			}
    		default:
    			// Unreserved according to RFC 3986 sec 2.3
    			if 'a' <= c && c <= 'z' {
    				continue
    			}
    			if 'A' <= c && c <= 'Z' {
    				continue
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 06 15:48:16 UTC 2022
    - 6.6K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/syntax/scanner.go

    func isLetter(ch rune) bool  { return 'a' <= lower(ch) && lower(ch) <= 'z' || ch == '_' }
    func isDecimal(ch rune) bool { return '0' <= ch && ch <= '9' }
    func isHex(ch rune) bool     { return '0' <= ch && ch <= '9' || 'a' <= lower(ch) && lower(ch) <= 'f' }
    
    // digits accepts the sequence { digit | '_' }.
    // If base <= 10, digits accepts any decimal digit but records
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 28 18:17:41 UTC 2022
    - 17.1K bytes
    - Viewed (0)
  5. src/text/scanner/scanner.go

    		ch = s.next()
    	}
    	return ch
    }
    
    func lower(ch rune) rune     { return ('a' - 'A') | ch } // returns lower-case ch iff ch is ASCII letter
    func isDecimal(ch rune) bool { return '0' <= ch && ch <= '9' }
    func isHex(ch rune) bool     { return '0' <= ch && ch <= '9' || 'a' <= lower(ch) && lower(ch) <= 'f' }
    
    // digits accepts the sequence { digit | '_' } starting with ch0.
    // If base <= 10, digits accepts any decimal digit but records
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 20:57:51 UTC 2024
    - 20.3K bytes
    - Viewed (0)
  6. src/net/http/httputil/reverseproxy.go

    	}
    	for i := 0; i < len(s); {
    		switch s[i] {
    		case ';':
    			return reencode(s)
    		case '%':
    			if i+2 >= len(s) || !ishex(s[i+1]) || !ishex(s[i+2]) {
    				return reencode(s)
    			}
    			i += 3
    		default:
    			i++
    		}
    	}
    	return s
    }
    
    func ishex(c byte) bool {
    	switch {
    	case '0' <= c && c <= '9':
    		return true
    	case 'a' <= c && c <= 'f':
    		return true
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 27 23:37:42 UTC 2024
    - 24.9K bytes
    - Viewed (0)
  7. src/go/scanner/scanner.go

    	return 16 // larger than any legal digit val
    }
    
    func lower(ch rune) rune     { return ('a' - 'A') | ch } // returns lower-case ch iff ch is ASCII letter
    func isDecimal(ch rune) bool { return '0' <= ch && ch <= '9' }
    func isHex(ch rune) bool     { return '0' <= ch && ch <= '9' || 'a' <= lower(ch) && lower(ch) <= 'f' }
    
    // digits accepts the sequence { digit | '_' }.
    // If base <= 10, digits accepts any decimal digit but records
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:03 UTC 2023
    - 24.3K bytes
    - Viewed (0)
  8. src/net/url/url.go

    	// Count %, check that they're well-formed.
    	n := 0
    	hasPlus := false
    	for i := 0; i < len(s); {
    		switch s[i] {
    		case '%':
    			n++
    			if i+2 >= len(s) || !ishex(s[i+1]) || !ishex(s[i+2]) {
    				s = s[i:]
    				if len(s) > 3 {
    					s = s[:3]
    				}
    				return "", EscapeError(s)
    			}
    			// Per https://tools.ietf.org/html/rfc3986#page-21
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:16:53 UTC 2024
    - 36.1K bytes
    - Viewed (0)
  9. src/cmd/vendor/golang.org/x/arch/x86/x86asm/inst.go

    	PrefixVEX2Bytes Prefix = 0xC5 // Short form of vex prefix
    	PrefixVEX3Bytes Prefix = 0xC4 // Long form of vex prefix
    )
    
    // IsREX reports whether p is a REX prefix byte.
    func (p Prefix) IsREX() bool {
    	return p&0xF0 == PrefixREX
    }
    
    func (p Prefix) IsVEX() bool {
    	return p&0xFF == PrefixVEX2Bytes || p&0xFF == PrefixVEX3Bytes
    }
    
    func (p Prefix) String() string {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:33 UTC 2023
    - 10.6K bytes
    - Viewed (0)
  10. src/cmd/vendor/golang.org/x/arch/x86/x86asm/plan9x.go

    		a := inst.Args[i]
    		if a == nil {
    			continue
    		}
    		args = append(args, plan9Arg(&inst, pc, symname, a))
    	}
    
    	var rep string
    	var last Prefix
    	for _, p := range inst.Prefix {
    		if p == 0 || p.IsREX() || p.IsVEX() {
    			break
    		}
    
    		switch {
    		// Don't show prefixes implied by the instruction text.
    		case p&0xFF00 == PrefixImplicit:
    			continue
    		// Only REP and REPN are recognized repeaters. Plan 9 syntax
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jul 12 20:38:21 UTC 2023
    - 7.2K bytes
    - Viewed (0)
Back to top