- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for ScanRunes (0.04 sec)
-
src/bufio/scan.go
if atEOF && len(data) == 0 { return 0, nil, nil } return 1, data[0:1], nil } var errorRune = []byte(string(utf8.RuneError)) // ScanRunes is a split function for a [Scanner] that returns each // UTF-8-encoded rune as a token. The sequence of runes returned is // equivalent to that from a range loop over the input as a string, which
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/bufio/scan_test.go
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 { if !s.Scan() { break } runeCount++
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Sep 22 16:22:42 UTC 2023 - 14.3K bytes - Viewed (0)