MCPcopy Create free account
hub / github.com/buger/jsonparser / Unescape

Function Unescape

escape.go:284–286  ·  view source on GitHub ↗

unescape unescapes the string contained in 'in' and returns it as a slice. If 'in' contains no escaped characters: Returns 'in'. Else, if 'out' is of sufficient capacity (guaranteed if cap(out) >= len(in)): 'out' is used to build the unescaped string and is returned with no extra allocation El

(in, out []byte)

Source from the content-addressed store, hash-verified

282//
283// A new slice is allocated and returned.
284func Unescape(in, out []byte) ([]byte, error) {
285 return unescapeConfig(DefaultConfig, in, out)
286}
287
288// SYS-REQ-115
289func unescapeConfig(config Config, in, out []byte) ([]byte, error) {

Callers 15

parseQuotedPathKeyFunction · 0.85
EachKeyFunction · 0.85
EachKeyErrFunction · 0.85
ParseStringFunction · 0.85
TestUnescapeFunction · 0.85
TestEscapeFunction · 0.85

Calls 1

unescapeConfigFunction · 0.85