pub fn u32_to_bool(a: u32) -> bool
Parse u32
to
bool
If a
is 0 then returns false
,
otherwise true
.
use rustils::parse::boolean::u32_to_bool;
let a = 42_u32;
let b = 1_u32;
let c = 0_u32;
assert!(u32_to_bool(a));
assert!(u32_to_bool(b));
assert!(!u32_to_bool(c));