MCPcopy Create free account
hub / github.com/buger/jsonparser / nextToken

Function nextToken

parser.go:226–237  ·  view source on GitHub ↗

SYS-REQ-001 Find position of next character which is not whitespace reqproof:lemma nextToken_in_range func(data []byte) bool { r := nextToken(data) return r >= -1 && r < len(data) } reqproof:lemma nextToken_empty_neg func(data []byte) bool { return !(len(data) == 0) || nextToken(data)

(data []byte)

Source from the content-addressed store, hash-verified

224// return true
225// }
226func nextToken(data []byte) int {
227 for i, c := range data {
228 // reqproof:invariant 0 <= i
229 // reqproof:invariant i <= len(data)
230 if c == ' ' || c == '\n' || c == '\r' || c == '\t' {
231 continue
232 }
233 return i
234 }
235
236 return -1
237}
238
239// SYS-REQ-001
240// Find position of last character which is not whitespace

Callers 14

findKeyStartFunction · 0.85
searchKeysFunction · 0.85
EachKeyFunction · 0.85
EachKeyErrFunction · 0.85
DeleteFoundFunction · 0.85
SetFunction · 0.85
internalGetFunction · 0.85
ArrayEachFunction · 0.85
arrayEachErrFunction · 0.85
ObjectEachFunction · 0.85
containerStartFunction · 0.85

Calls

no outgoing calls