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