Function bitAnd [src]

r = a & b

Prototype

pub fn bitAnd(r: *Managed, a: *const Managed, b: *const Managed) !void

Parameters

r: *Manageda: *const Managedb: *const Managed

Source

pub fn bitAnd(r: *Managed, a: *const Managed, b: *const Managed) !void { const cap = if (a.len() >= b.len()) if (b.isPositive()) b.len() else if (a.isPositive()) a.len() else a.len() + 1 else if (a.isPositive()) a.len() else if (b.isPositive()) b.len() else b.len() + 1; try r.ensureCapacity(cap); var m = r.toMutable(); m.bitAnd(a.toConst(), b.toConst()); r.setMetadata(m.positive, m.len); }