// parseStringValue parses string field token. // This differs from parseString since the text format allows // multiple back-to-back string literals where they are semantically treated // as a single large string with all values concatenated. // // E.g., `"foo" "bar" "baz"` => "foobarbaz" func (d *Decoder) parseStringValue() (Token, error) { … } // parseString parses a string value enclosed in " or '. func (d *Decoder) parseString() (string, error) { … } // indexNeedEscapeInString returns the index of the character that needs // escaping. If no characters need escaping, this returns the input length. func indexNeedEscapeInBytes(b []byte) int { … } // UnmarshalString returns an unescaped string given a textproto string value. // String value needs to contain single or double quotes. This is only used by // internal/encoding/defval package for unmarshaling bytes. func UnmarshalString(s string) (string, error) { … }