str

Function str 

Source
pub fn str(str: &'static str) -> StrEqualParser<'static>
Expand description

Compare the input string starts with the given string.

for borrowing-safety, the lifetime of str must be ’static. for non-static string, use crate::string() instead.

Output: ()

§Example

use rusty_parser as rp;
use rp::IntoParser;

let hello_parser = rp::str("hello");
let hello_parser = "hello".into_parser();