MCPcopy Create free account
hub / github.com/brimdata/super / Shorten

Method Shorten

vector/bitvec/bits.go:69–71  ·  view source on GitHub ↗

Shorten may be called to shorten the length of an allocated vector. This is useful when you know that a vector has a limit but you're not sure how large it might be. Create the vector with max length, write to it with Set, then shorten it to the actual length.

(length uint32)

Source from the content-addressed store, hash-verified

67// sure how large it might be. Create the vector with max length, write
68// to it with Set, then shorten it to the actual length.
69func (b *Bits) Shorten(length uint32) {
70 b.length = length
71}
72
73func (b Bits) Len() uint32 {
74 return b.length

Callers 1

stringToBoolFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected