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

Function trimTrailingSpaces

json/parse.go:55–60  ·  view source on GitHub ↗
(b []byte)

Source from the content-addressed store, hash-verified

53}
54
55func trimTrailingSpaces(b []byte) []byte {
56 if len(b) > 0 && b[len(b)-1] <= 0x20 {
57 b = trimTrailingSpacesN(b)
58 }
59 return b
60}
61
62func trimTrailingSpacesN(b []byte) []byte {
63 i := len(b) - 1

Callers 1

internalParseFlagsFunction · 0.85

Calls 1

trimTrailingSpacesNFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…