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