pub fn string<'a, Input>(
    s: &'static str
) -> impl Parser<Input, Output = &'a str> where
    Input: Stream<Token = char>,
    Input::Error: ParseError<Input::Token, Input::Range, Input::Position>, 
Expand description

Parses the string s.

let result = string("rust")
    .parse("rust")
    .map(|x| x.0);
assert_eq!(result, Ok("rust"));