Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 40 for RuneSelf (0.45 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/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)
  3. 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)
  4. src/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: Fri Apr 26 19:27:51 UTC 2019
    - 11K bytes
    - Viewed (0)
  5. 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)
  6. src/text/scanner/scanner.go

    func (s *Scanner) Init(src io.Reader) *Scanner {
    	s.src = src
    
    	// initialize source buffer
    	// (the first call to next() will fill it by calling src.Read)
    	s.srcBuf[0] = utf8.RuneSelf // sentinel
    	s.srcPos = 0
    	s.srcEnd = 0
    
    	// initialize source position
    	s.srcBufOffset = 0
    	s.line = 1
    	s.column = 0
    	s.lastLineLen = 0
    	s.lastCharLen = 0
    
    	// initialize token text buffer
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 20:57:51 UTC 2024
    - 20.3K bytes
    - Viewed (0)
  7. src/regexp/regexp.go

    	// 0 < pos && pos <= len(i.str)
    	if uint(pos-1) < uint(len(i.str)) {
    		r1 = rune(i.str[pos-1])
    		if r1 >= utf8.RuneSelf {
    			r1, _ = utf8.DecodeLastRuneInString(i.str[:pos])
    		}
    	}
    	// 0 <= pos && pos < len(i.str)
    	if uint(pos) < uint(len(i.str)) {
    		r2 = rune(i.str[pos])
    		if r2 >= utf8.RuneSelf {
    			r2, _ = utf8.DecodeRuneInString(i.str[pos:])
    		}
    	}
    	return newLazyFlag(r1, r2)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 20:50:01 UTC 2024
    - 38.5K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/syntax/scanner.go

    		s.nextch()
    	}
    
    	// token start
    	s.line, s.col = s.pos()
    	s.blank = s.line > startLine || startCol == colbase
    	s.start()
    	if isLetter(s.ch) || s.ch >= utf8.RuneSelf && s.atIdentChar(true) {
    		s.nextch()
    		s.ident()
    		return
    	}
    
    	switch s.ch {
    	case -1:
    		if nlsemi {
    			s.lit = "EOF"
    			s.tok = _Semi
    			break
    		}
    		s.tok = _EOF
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 28 18:17:41 UTC 2022
    - 17.1K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/walk/range.go

    		nind.SetBounded(true)
    		body = append(body, ir.NewAssignStmt(base.Pos, hv2, typecheck.Conv(nind, types.RuneType)))
    
    		// if hv2 < utf8.RuneSelf
    		nif := ir.NewIfStmt(base.Pos, nil, nil, nil)
    		nif.Cond = ir.NewBinaryExpr(base.Pos, ir.OLT, hv2, ir.NewInt(base.Pos, utf8.RuneSelf))
    
    		// hv1++
    		nif.Body = []ir.Node{ir.NewAssignStmt(base.Pos, hv1, ir.NewBinaryExpr(base.Pos, ir.OADD, hv1, ir.NewInt(base.Pos, 1)))}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 20 14:52:33 UTC 2023
    - 17.6K bytes
    - Viewed (0)
  10. src/go/scanner/scanner.go

    	return i + 1, int(n), err == nil
    }
    
    func isLetter(ch rune) bool {
    	return 'a' <= lower(ch) && lower(ch) <= 'z' || ch == '_' || ch >= utf8.RuneSelf && unicode.IsLetter(ch)
    }
    
    func isDigit(ch rune) bool {
    	return isDecimal(ch) || ch >= utf8.RuneSelf && unicode.IsDigit(ch)
    }
    
    // scanIdentifier reads the string of valid identifier characters at s.offset.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:03 UTC 2023
    - 24.3K bytes
    - Viewed (0)
Back to top