[][src]Function onigiri::validator::is_negative_float

pub fn is_negative_float(vc: &[char]) -> bool

Validate Vec<char> whether it is negative float.

use onigiri::validator::is_negative_float;

let test_float = vec!['0', '.', '1', '2'];
let test_float2 = vec!['-', '0', '.', '1'];

assert_eq!(
    is_negative_float(&test_float),
    false
);
assert_eq!(
    is_negative_float(&test_float2),
    true
);