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

Function trimTrailingSpacesN

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

Source from the content-addressed store, hash-verified

60}
61
62func trimTrailingSpacesN(b []byte) []byte {
63 i := len(b) - 1
64loop:
65 for ; i >= 0; i-- {
66 switch b[i] {
67 case sp, ht, nl, cr:
68 default:
69 break loop
70 }
71 }
72 return b[:i+1]
73}
74
75// parseInt parses a decimal representation of an int64 from b.
76//

Callers 1

trimTrailingSpacesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…