pub const fn digit(radix: u32) -> DigitExpand description
Reference is_digit.
Example
use neure::prelude::*;
use neu::*;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let digit = digit(10);
let digit = digit.repeat_times::<2>();
let mut ctx = CharsCtx::new("54aa");
assert_eq!(ctx.try_mat(&digit)?, Span::new(0, 2));
assert!(ctx.try_mat(&digit).is_err());
Ok(())
}