MCPcopy Create free account
hub / github.com/bits-and-blooms/bitset / ExampleBitSet_String

Function ExampleBitSet_String

example_test.go:203–207  ·  view source on GitHub ↗

ExampleBitSet_String renders the set in mathematical set notation.

()

Source from the content-addressed store, hash-verified

201
202// ExampleBitSet_String renders the set in mathematical set notation.
203func ExampleBitSet_String() {
204 b := New(50).Set(1).Set(17).Set(49)
205 fmt.Println(b.String())
206 // Output: {1,17,49}
207}
208
209// ExampleBitSet_Rank counts how many bits are set at or below the given index.
210func ExampleBitSet_Rank() {

Callers

nothing calls this directly

Calls 3

NewFunction · 0.85
SetMethod · 0.80
StringMethod · 0.80

Tested by

no test coverage detected