Function neure::neu::numeric

source ·
pub const fn numeric() -> Numeric
Expand description

Reference is_numeric.

Example

use neure::prelude::*;
use neu::*;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let numeric = numeric();
    let numeric = numeric.repeat_times::<2>();
    let mut ctx = CharsCtx::new("①¾Kو");

    assert_eq!(ctx.try_mat(&numeric)?, Span::new(0, 5));
    assert!(ctx.try_mat(&numeric).is_err());
    Ok(())
}