MCPcopy Create free account
hub / github.com/ashvardanian/StringZilla / add_u8

Method add_u8

rust/stringzilla.rs:336–340  ·  view source on GitHub ↗
(&mut self, c: u8)

Source from the content-addressed store, hash-verified

334 /// Adds a byte to the set.
335 #[inline]
336 pub fn add_u8(&mut self, c: u8) {
337 let idx = (c >> 6) as usize; // Divide by 64.
338 let bit = c & 63; // Remainder modulo 64.
339 self.bits[idx] |= 1 << bit;
340 }
341
342 /// Adds a character to the set.
343 ///

Callers 2

addMethod · 0.80
from_bytesMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected