Function is_bin_digit

fn is_bin_digit(chr: u8) -> bool

Tests if byte is ASCII binary digit: 0-1

Example

# use nom::character::is_bin_digit;
assert_eq!(is_bin_digit(b'a'), false);
assert_eq!(is_bin_digit(b'2'), false);
assert_eq!(is_bin_digit(b'0'), true);
assert_eq!(is_bin_digit(b'1'), true);