MCPcopy Create free account
hub / github.com/segmentio/encoding / hasPrefix

Function hasPrefix

json/parse.go:737–739  ·  view source on GitHub ↗
(b []byte, s string)

Source from the content-addressed store, hash-verified

735}
736
737func hasPrefix(b []byte, s string) bool {
738 return len(b) >= len(s) && s == string(b[:len(s)])
739}
740
741func hasLeadingSign(b []byte) bool {
742 return len(b) > 0 && (b[0] == '+' || b[0] == '-')

Callers 3

BenchmarkHasPrefixFunction · 0.85
parseStringUnquoteMethod · 0.85
decodeFromStringToIntMethod · 0.85

Calls

no outgoing calls

Tested by 1

BenchmarkHasPrefixFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…