Function neure::neu::ascii_digit
source · pub const fn ascii_digit() -> AsciiDigitExpand description
Reference is_ascii_digit or is_ascii_digit.
Example
use neure::prelude::*;
use neu::*;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let ascii_digit = ascii_digit();
let ascii_digit = ascii_digit.repeat_times::<2>();
let mut ctx = CharsCtx::new("90fe");
assert_eq!(ctx.try_mat(&ascii_digit)?, Span::new(0, 2));
assert!(ctx.try_mat(&ascii_digit).is_err());
Ok(())
}