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