- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 105 for Rune (0.03 sec)
-
src/bytes/reader.go
r.i-- return nil } // ReadRune implements the [io.RuneReader] interface. func (r *Reader) ReadRune() (ch rune, size int, err error) { if r.i >= int64(len(r.s)) { r.prevRune = -1 return 0, 0, io.EOF } r.prevRune = int(r.i) if c := r.s[r.i]; c < utf8.RuneSelf { r.i++ return rune(c), 1, nil } ch, size = utf8.DecodeRune(r.s[r.i:]) r.i += int64(size) return }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Tue Jul 16 18:17:37 UTC 2024 - 3.9K bytes - Viewed (0) -
src/bufio/scan.go
if width > 1 { // It's a valid encoding. Width cannot be one for a correctly encoded // non-ASCII rune. return width, data[0:width], nil } // We know it's an error: we have width==1 and implicitly r==utf8.RuneError. // Is the error because there wasn't a full rune to be decoded? // FullRune distinguishes correctly between erroneous and incomplete encodings. if !atEOF && !utf8.FullRune(data) {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Mon Oct 23 09:06:30 UTC 2023 - 14.2K bytes - Viewed (0) -
src/bytes/example_test.go
fmt.Println(bytes.LastIndexFunc([]byte("go gopher!"), unicode.IsNumber)) // Output: // 8 // 9 // -1 } func ExampleMap() { rot13 := func(r rune) rune { switch { case r >= 'A' && r <= 'Z': return 'A' + (r-'A'+13)%26 case r >= 'a' && r <= 'z': return 'a' + (r-'a'+13)%26 } return r }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Wed Aug 07 17:22:36 UTC 2024 - 14.9K bytes - Viewed (0) -
src/cmd/asm/internal/asm/parse.go
// // R1 // offset // $offset // Every piece is optional, so we scan left to right and what // we discover tells us where we are. // Prefix: $. var prefix rune switch tok := p.peek(); tok { case '$', '*': prefix = rune(tok) p.next() } // Symbol: sym±offset(SB) tok := p.next() name := tok.String() if tok.ScanToken == scanner.Ident && !p.atStartOfRegister(name) {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Wed Sep 04 18:16:59 UTC 2024 - 36.9K bytes - Viewed (0) -
src/cmd/asm/internal/lex/tokenizer.go
line: 1, file: file, } } // We want center dot (·) and division slash (∕) to work as identifier characters. func isIdentRune(ch rune, i int) bool { if unicode.IsLetter(ch) { return true } switch ch { case '_': // Underscore; traditional. return true case '\u00B7': // Represents the period in runtime.exit. U+00B7 '·' middle dot
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu Aug 04 20:35:21 UTC 2022 - 3K bytes - Viewed (0) -
internal/event/target/postgresql.go
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Sep 06 23:06:30 UTC 2024 - 13.3K bytes - Viewed (0) -
utils/utils.go
return string(strconv.AppendInt(append([]byte(frame.File), ':'), int64(frame.Line), 10)) } } return "" } func IsValidDBNameChar(c rune) bool { return !unicode.IsLetter(c) && !unicode.IsNumber(c) && c != '.' && c != '*' && c != '_' && c != '$' && c != '@' } // CheckTruth check string true or not func CheckTruth(vals ...string) bool {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Aug 22 11:03:42 UTC 2024 - 4.1K bytes - Viewed (0) -
src/bufio/scan_test.go
if err != nil { t.Errorf("#%d: %v", n, err) } } } // Test that the rune splitter returns same sequence of runes (not bytes) as for range string. func TestScanRune(t *testing.T) { for n, test := range scanTests { buf := strings.NewReader(test) s := NewScanner(buf) s.Split(ScanRunes) var i, runeCount int var expect rune // Use a string range loop to validate the sequence of runes. for i, expect = range test {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Sep 22 16:22:42 UTC 2023 - 14.3K bytes - Viewed (0) -
cmd/api-headers_test.go
import ( "testing" ) func TestNewRequestID(t *testing.T) { // Ensure that it returns an alphanumeric result of length 16. id := mustGetRequestID(UTCNow()) if len(id) != 16 { t.Fail() } var e rune for _, char := range id { e = char // Ensure that it is alphanumeric, in this case, between 0-9 and A-Z. if !(('0' <= e && e <= '9') || ('A' <= e && e <= 'Z')) { t.Fail() } }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Jan 02 17:15:06 UTC 2022 - 1.1K bytes - Viewed (0) -
src/bufio/bufio.go
b.lastRuneSize = -1 return nil } // ReadRune reads a single UTF-8 encoded Unicode character and returns the // rune and its size in bytes. If the encoded rune is invalid, it consumes one byte // and returns unicode.ReplacementChar (U+FFFD) with a size of 1. func (b *Reader) ReadRune() (r rune, size int, err error) { for b.r+utf8.UTFMax > b.w && !utf8.FullRune(b.buf[b.r:b.w]) && b.err == nil && b.w-b.r < len(b.buf) {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu Oct 12 14:39:08 UTC 2023 - 21.8K bytes - Viewed (0)