pub fn string(str: String) -> StringEqualParser
Expand description
Compare the input string starts with the given string.
This will copy all the characters into String
, so lifetime belongs to the parser itself.
Output
: ()
ยงExample
use rusty_parser as rp;
use rp::IntoParser;
let hello_parser = rp::string("hello".to_string());
let hello_parser = "hello".to_string().into_parser();