[][src]Function combine::parser::char::string

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

Parses the string s.

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