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