[][src]Function rustils::parse::long::bool_to_i64

pub fn bool_to_i64(a: bool) -> i64

Parse bool to i64

If a is false then returns 0.
If a is true then returns 1.

Arguments

Examples

use rustils::parse::long::bool_to_i64;

assert_eq!(bool_to_i64(true), 1_i64);
assert_eq!(bool_to_i64(false), 0_i64);