Skip to main content

cast_to_bool

Function cast_to_bool 

Source
pub fn cast_to_bool(v: &[u8]) -> bool
Expand description

CastToBool: truthiness check for stack elements (BIP62/consensus). Returns true if ANY byte is non-zero, except for “negative zero” (0x80 in last byte, rest zeros).