NOTE: this returns a rune, but only decodes the byte at the offset.
(offset int)
| 432 | |
| 433 | // NOTE: this returns a rune, but only decodes the byte at the offset. |
| 434 | func (s *Scanner) charAt(offset int) rune { |
| 435 | if s.pos+offset < s.end { |
| 436 | return rune(s.text[s.pos+offset]) |
| 437 | } |
| 438 | return -1 |
| 439 | } |
| 440 | |
| 441 | func (s *Scanner) charAndSize() (rune, int) { |
| 442 | // Fast path: a single ASCII byte. The vast majority of source bytes are |
no outgoing calls
no test coverage detected