helpful to have around for debugging
()
| 109 | |
| 110 | // helpful to have around for debugging |
| 111 | func (b Bits) String() string { |
| 112 | if b.IsZero() { |
| 113 | return "empty" |
| 114 | } |
| 115 | var s strings.Builder |
| 116 | for k := range b.Len() { |
| 117 | if b.IsSet(k) { |
| 118 | s.WriteByte('1') |
| 119 | } else { |
| 120 | s.WriteByte('0') |
| 121 | } |
| 122 | } |
| 123 | return s.String() |
| 124 | } |
| 125 | |
| 126 | func Not(a Bits) Bits { |
| 127 | not := NewFalse(a.Len()) |