Function parsell::character_map
[−]
[src]
pub fn character_map<F>(f: F) -> Map<Character<IsSome<F>>, Unwrap<F>> where
F: Copy,
An uncommitted parser that reads one character and applies a function to it.
The parser character_map(f)
reads one character ch
from the input,
if f(ch)
is Some(value)
then it commits and the result is value
,
otherwise it backtracks.
This requires characters to be copyable.