Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fn paz(input: &str) -> IResult<&str, String>
- {
- terminated(map(many0(one_of("ABCDEFGHIJKLMNOPQRSTUVWYYZ")), |v| v.into_iter().collect::<String>()),
- nom::character::complete::char(':'))(input)
- }
- #[test]
- fn test_az() {
- assert_eq!(paz("ABC:"), Ok(("", "ABC".to_string())));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement