Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 73 for RuneSelf (0.22 sec)

  1. src/strings/strings.go

    // r, or -1 if rune is not present in s.
    // If r is utf8.RuneError, it returns the first instance of any
    // invalid UTF-8 byte sequence.
    func IndexRune(s string, r rune) int {
    	switch {
    	case 0 <= r && r < utf8.RuneSelf:
    		return IndexByte(s, byte(r))
    	case r == utf8.RuneError:
    		for i, r := range s {
    			if r == utf8.RuneError {
    				return i
    			}
    		}
    		return -1
    	case !utf8.ValidRune(r):
    		return -1
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 16:48:16 UTC 2024
    - 31.2K bytes
    - Viewed (0)
  2. src/vendor/golang.org/x/text/unicode/norm/input.go

    	if in.bytes == nil {
    		return in.str[p]
    	}
    	return in.bytes[p]
    }
    
    func (in *input) skipASCII(p, max int) int {
    	if in.bytes == nil {
    		for ; p < max && in.str[p] < utf8.RuneSelf; p++ {
    		}
    	} else {
    		for ; p < max && in.bytes[p] < utf8.RuneSelf; p++ {
    		}
    	}
    	return p
    }
    
    func (in *input) skipContinuationBytes(p int) int {
    	if in.bytes == nil {
    		for ; p < len(in.str) && !utf8.RuneStart(in.str[p]); p++ {
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 11 20:28:54 UTC 2019
    - 2K bytes
    - Viewed (0)
  3. src/cmd/vendor/golang.org/x/text/unicode/norm/input.go

    	if in.bytes == nil {
    		return in.str[p]
    	}
    	return in.bytes[p]
    }
    
    func (in *input) skipASCII(p, max int) int {
    	if in.bytes == nil {
    		for ; p < max && in.str[p] < utf8.RuneSelf; p++ {
    		}
    	} else {
    		for ; p < max && in.bytes[p] < utf8.RuneSelf; p++ {
    		}
    	}
    	return p
    }
    
    func (in *input) skipContinuationBytes(p int) int {
    	if in.bytes == nil {
    		for ; p < len(in.str) && !utf8.RuneStart(in.str[p]); p++ {
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 24 13:01:26 UTC 2024
    - 2K bytes
    - Viewed (0)
  4. src/unicode/utf8/utf8.go

    // Numbers fundamental to the encoding.
    const (
    	RuneError = '\uFFFD'     // the "error" Rune or "Unicode replacement character"
    	RuneSelf  = 0x80         // characters below RuneSelf are represented as themselves in a single byte.
    	MaxRune   = '\U0010FFFF' // Maximum valid Unicode code point.
    	UTFMax    = 4            // maximum number of bytes of a UTF-8 encoded Unicode character.
    )
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 02:00:36 UTC 2024
    - 16.4K bytes
    - Viewed (0)
  5. src/encoding/json/tables.go

    // escaping.
    //
    // All values are true except for the ASCII control characters (0-31), the
    // double quote ("), and the backslash character ("\").
    var safeSet = [utf8.RuneSelf]bool{
    	' ':      true,
    	'!':      true,
    	'"':      false,
    	'#':      true,
    	'$':      true,
    	'%':      true,
    	'&':      true,
    	'\'':     true,
    	'(':      true,
    	')':      true,
    	'*':      true,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 08 18:02:34 UTC 2016
    - 4.2K bytes
    - Viewed (0)
  6. src/runtime/utf8.go

    // license that can be found in the LICENSE file.
    
    package runtime
    
    // Numbers fundamental to the encoding.
    const (
    	runeError = '\uFFFD'     // the "error" Rune or "Unicode replacement character"
    	runeSelf  = 0x80         // characters below runeSelf are represented as themselves in a single byte.
    	maxRune   = '\U0010FFFF' // Maximum valid Unicode code point.
    )
    
    // Code points in the surrogate range are not valid for UTF-8.
    const (
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 06 02:46:02 UTC 2020
    - 3.4K bytes
    - Viewed (0)
  7. src/vendor/golang.org/x/net/http/httpguts/httplex.go

    	's':  true,
    	't':  true,
    	'u':  true,
    	'v':  true,
    	'w':  true,
    	'x':  true,
    	'y':  true,
    	'z':  true,
    	'|':  true,
    	'~':  true,
    }
    
    func IsTokenRune(r rune) bool {
    	return r < utf8.RuneSelf && isTokenTable[byte(r)]
    }
    
    // HeaderValuesContainsToken reports whether any string in values
    // contains the provided token, ASCII case-insensitively.
    func HeaderValuesContainsToken(values []string, token string) bool {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  8. src/encoding/json/fold.go

    	return appendFoldedName(arr[:0], in)
    }
    
    func appendFoldedName(out, in []byte) []byte {
    	for i := 0; i < len(in); {
    		// Handle single-byte ASCII.
    		if c := in[i]; c < utf8.RuneSelf {
    			if 'a' <= c && c <= 'z' {
    				c -= 'a' - 'A'
    			}
    			out = append(out, c)
    			i++
    			continue
    		}
    		// Handle multi-byte Unicode.
    		r, n := utf8.DecodeRune(in[i:])
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 27 17:37:27 UTC 2023
    - 1.1K bytes
    - Viewed (0)
  9. src/net/http/http.go

    }
    
    func hexEscapeNonASCII(s string) string {
    	newLen := 0
    	for i := 0; i < len(s); i++ {
    		if s[i] >= utf8.RuneSelf {
    			newLen += 3
    		} else {
    			newLen++
    		}
    	}
    	if newLen == len(s) {
    		return s
    	}
    	b := make([]byte, 0, newLen)
    	var pos int
    	for i := 0; i < len(s); i++ {
    		if s[i] >= utf8.RuneSelf {
    			if pos < i {
    				b = append(b, s[pos:i]...)
    			}
    			b = append(b, '%')
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 10 03:29:50 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  10. internal/kms/context.go

    var hexTable = "0123456789abcdef"
    
    // escapeStringJSON will escape a string for JSON and write it to dst.
    func escapeStringJSON(dst *bytes.Buffer, s string) {
    	start := 0
    	for i := 0; i < len(s); {
    		if b := s[i]; b < utf8.RuneSelf {
    			if htmlSafeSet[b] {
    				i++
    				continue
    			}
    			if start < i {
    				dst.WriteString(s[start:i])
    			}
    			dst.WriteByte('\\')
    			switch b {
    			case '\\', '"':
    				dst.WriteByte(b)
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Sun Jan 02 17:15:06 UTC 2022
    - 6K bytes
    - Viewed (0)
Back to top