Function neure::re::string

source ·
pub fn string(lit: &str) -> LitString<'_>
Expand description

Match given string.

Example

    let rust = re::string("rust");
    let mut ctx = CharsCtx::new("rust2023");

    assert_eq!(ctx.try_mat(&rust)?, Span::new(0, 4));

    Ok(())