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

Function trimQuote

jsonpb/decode.go:526–531  ·  view source on GitHub ↗

trimQuote is like unquoteString but simply strips surrounding quotes. This is incorrect, but is behavior done by the legacy implementation.

(in []byte)

Source from the content-addressed store, hash-verified

524// trimQuote is like unquoteString but simply strips surrounding quotes.
525// This is incorrect, but is behavior done by the legacy implementation.
526func trimQuote(in []byte) []byte {
527 if len(in) >= 2 && in[0] == '"' && in[len(in)-1] == '"' {
528 in = in[1 : len(in)-1]
529 }
530 return in
531}

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected