An easy to use string muncher that allows easy tokenization when writing a parser. Muncher has peek
and fork capabilities so you can look ahead and behind when needed. If lexing braces Muncher
has a built in brace matching stack accessed from Muncher::brace_stack()
.
toml
[dependencies]
muncher = "0.6"
```rust use muncher::Muncher;
let input = "hello\nworld"; let mut m = Muncher::new(input);
let hello = m.eatuntil(|c| c == &'\n').collect::
Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.