Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 58 for RuneSelf (0.17 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/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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. src/cmd/vendor/golang.org/x/text/unicode/norm/iter.go

    	return i.next(i)
    }
    
    func nextASCIIBytes(i *Iter) []byte {
    	p := i.p + 1
    	if p >= i.rb.nsrc {
    		p0 := i.p
    		i.setDone()
    		return i.rb.src.bytes[p0:p]
    	}
    	if i.rb.src.bytes[p] < utf8.RuneSelf {
    		p0 := i.p
    		i.p = p
    		return i.rb.src.bytes[p0:p]
    	}
    	i.info = i.rb.f.info(i.rb.src, i.p)
    	i.next = i.rb.f.nextMain
    	return i.next(i)
    }
    
    func nextASCIIString(i *Iter) []byte {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 24 13:01:26 UTC 2024
    - 11K bytes
    - Viewed (0)
  8. src/cmd/go/internal/str/str.go

    func ToFold(s string) string {
    	// Fast path: all ASCII, no upper case.
    	// Most paths look like this already.
    	for i := 0; i < len(s); i++ {
    		c := s[i]
    		if c >= utf8.RuneSelf || 'A' <= c && c <= 'Z' {
    			goto Slow
    		}
    	}
    	return s
    
    Slow:
    	var b strings.Builder
    	for _, r := range s {
    		// SimpleFold(x) cycles to the next equivalent rune > x
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 23 20:08:07 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  9. src/log/slog/json_handler.go

    	char := func(b byte) { buf = append(buf, b) }
    	str := func(s string) { buf = append(buf, s...) }
    
    	start := 0
    	for i := 0; i < len(s); {
    		if b := s[i]; b < utf8.RuneSelf {
    			if safeSet[b] {
    				i++
    				continue
    			}
    			if start < i {
    				str(s[start:i])
    			}
    			char('\\')
    			switch b {
    			case '\\', '"':
    				char(b)
    			case '\n':
    				char('n')
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 17 16:18:11 UTC 2023
    - 8.1K bytes
    - Viewed (0)
  10. src/strconv/quote.go

    		nBuf := make([]byte, len(buf), len(buf)+1+len(s)+1)
    		copy(nBuf, buf)
    		buf = nBuf
    	}
    	buf = append(buf, quote)
    	for width := 0; len(s) > 0; s = s[width:] {
    		r := rune(s[0])
    		width = 1
    		if r >= utf8.RuneSelf {
    			r, width = utf8.DecodeRuneInString(s)
    		}
    		if width == 1 && r == utf8.RuneError {
    			buf = append(buf, `\x`...)
    			buf = append(buf, lowerhex[s[0]>>4])
    			buf = append(buf, lowerhex[s[0]&0xF])
    			continue
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:21:28 UTC 2024
    - 16.5K bytes
    - Viewed (0)
Back to top