Function neure::neu::ascii_alphabetic

source ·
pub const fn ascii_alphabetic() -> AsciiAlphabetic
Expand description

Reference is_ascii_alphabetic or is_ascii_alphabetic.

Example

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

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let ascii_alphabetic = ascii_alphabetic();
    let ascii_alphabetic = ascii_alphabetic.repeat_times::<2>();
    let mut ctx = CharsCtx::new("ab%e");

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