MCPcopy
hub / github.com/BishopFox/jsluice / Backup

Method Backup

strings.go:99–105  ·  view source on GitHub ↗

Backup moves the position pointer back by the length of the previous rune in the input string.

()

Source from the content-addressed store, hash-verified

97// Backup moves the position pointer back by the length of the
98// previous rune in the input string.
99func (s *stringLexer) Backup() {
100 if s.done || s.pos <= 0 {
101 return
102 }
103 _, l := utf8.DecodeLastRuneInString(s.str[:s.pos])
104 s.pos -= l
105}
106
107// Peek returns the next rune in the input string without advancing
108// the position pointer

Callers 4

PeekMethod · 0.95
AcceptMethod · 0.95
AcceptUntilMethod · 0.95
AcceptRunMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected