SplitScript reference / Integer / bitAnd

Integer.bitAnd

Operator

Self.bitAnd(other: Self) -> Self where Self: Integer

Combines two integers with a bitwise AND.

This method is also the implementation of the & operator.

Parameters

  • other: The other integer.

Effects: pure

Runtime behavior: available everywhere; synchronous

Examples

Isolate one flag from a mask

let selected = 0x30u32 & 0x20