MCPcopy Index your code
hub / github.com/buger/jsonparser / lastToken

Function lastToken

parser.go:154–165  ·  view source on GitHub ↗

SYS-REQ-001 Find position of last character which is not whitespace

(data []byte)

Source from the content-addressed store, hash-verified

152// SYS-REQ-001
153// Find position of last character which is not whitespace
154func lastToken(data []byte) int {
155 for i := len(data) - 1; i >= 0; i-- {
156 switch data[i] {
157 case ' ', '\n', '\r', '\t':
158 continue
159 default:
160 return i
161 }
162 }
163
164 return -1
165}
166
167// SYS-REQ-045
168// Tries to find the end of string

Callers 3

DeleteFunction · 0.85
SetFunction · 0.85

Calls

no outgoing calls

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…