Home | History | Annotate | Download | only in shootout

Lines Matching refs:bytes

75 func countMatches(pat string, bytes []byte) int {
79 e := re.FindIndex(bytes)
84 bytes = bytes[e[1]:]
90 bytes, err := ioutil.ReadAll(os.Stdin)
95 ilen := len(bytes)
97 bytes = regexp.MustCompile("(>[^\n]+)?\n").ReplaceAll(bytes, []byte{})
98 clen := len(bytes)
100 fmt.Printf("%s %d\n", s, countMatches(s, bytes))
103 bytes = regexp.MustCompile(sub.pat).ReplaceAll(bytes, []byte(sub.repl))
105 fmt.Printf("\n%d\n%d\n%d\n", ilen, clen, len(bytes))