- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for countNewlines (0.33 sec)
-
src/text/scanner/scanner_test.go
prevCount := s.ErrorCount checkTok(t, s, line, s.Scan(), want, text) if s.ErrorCount != prevCount+1 { t.Fatalf("want error for %q", text) } } func countNewlines(s string) int { n := 0 for _, ch := range s { if ch == '\n' { n++ } } return n } func testScan(t *testing.T, mode uint) { s := new(Scanner).Init(makeSource(" \t%s\n"))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 17 03:41:50 UTC 2022 - 25.3K bytes - Viewed (0)