MCPcopy Create free account
hub / github.com/IBM/newrelic-cli / hasPrefix

Function hasPrefix

utils/decoder.go:341–344  ·  view source on GitHub ↗

Return true if the first non-whitespace bytes in buf is prefix.

(buf []byte, prefix []byte)

Source from the content-addressed store, hash-verified

339// Return true if the first non-whitespace bytes in buf is
340// prefix.
341func hasPrefix(buf []byte, prefix []byte) bool {
342 trim := bytes.TrimLeftFunc(buf, unicode.IsSpace)
343 return bytes.HasPrefix(trim, prefix)
344}

Callers 1

hasJSONPrefixFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected