MCPcopy
hub / github.com/golang/protobuf / hasPrefixAndSuffix

Function hasPrefixAndSuffix

jsonpb/decode.go:517–522  ·  view source on GitHub ↗
(prefix byte, in []byte, suffix byte)

Source from the content-addressed store, hash-verified

515}
516
517func hasPrefixAndSuffix(prefix byte, in []byte, suffix byte) bool {
518 if len(in) >= 2 && in[0] == prefix && in[len(in)-1] == suffix {
519 return true
520 }
521 return false
522}
523
524// trimQuote is like unquoteString but simply strips surrounding quotes.
525// This is incorrect, but is behavior done by the legacy implementation.

Callers 2

unmarshalMessageMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected