MCPcopy Index your code
hub / github.com/g3n/engine / TokenNext

Method TokenNext

loader/collada/common.go:313–339  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

311}
312
313func (br *bytesReader) TokenNext() []byte {
314
315 // Skip leading separators
316 for br.pos < len(br.source) {
317 if bytes.IndexByte([]byte(tokenSep), br.source[br.pos]) < 0 {
318 break
319 }
320 br.pos++
321 }
322 if br.pos >= len(br.source) {
323 return nil
324 }
325
326 // Advance till the end of the token
327 start := br.pos
328 for br.pos < len(br.source) {
329 if bytes.IndexByte([]byte(tokenSep), br.source[br.pos]) >= 0 {
330 break
331 }
332 br.pos++
333 }
334 res := br.source[start:br.pos]
335 if len(res) == 0 {
336 return nil
337 }
338 return res
339}
340
341const step = 3
342

Callers 5

decVcountMethod · 0.95
decPrimitiveMethod · 0.95
decFloat32SequenceFunction · 0.95
decStringSequenceFunction · 0.95
decColorOrTextureMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected