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