[][src]Function rustils::parse::boolean::isize_to_bool

pub fn isize_to_bool(a: isize) -> bool

Parse isize to bool

If a is 0 then returns false, otherwise true.

Arguments

Examples

use rustils::parse::boolean::isize_to_bool;

let a = 42_isize;
let b = -1_isize;
let c = 0_isize;

assert!(isize_to_bool(a));
assert!(isize_to_bool(b));
assert!(!isize_to_bool(c));