NOTE: even though this returns a rune, it only decodes the current byte. It must be checked against utf8.RuneSelf to verify that a call to charAndSize is not needed.
()
| 424 | // It must be checked against utf8.RuneSelf to verify that a call to charAndSize |
| 425 | // is not needed. |
| 426 | func (s *Scanner) char() rune { |
| 427 | if s.pos < s.end { |
| 428 | return rune(s.text[s.pos]) |
| 429 | } |
| 430 | return -1 |
| 431 | } |
| 432 | |
| 433 | // NOTE: this returns a rune, but only decodes the byte at the offset. |
| 434 | func (s *Scanner) charAt(offset int) rune { |
no outgoing calls
no test coverage detected