Advertisement
Guest User

Untitled

a guest
Aug 20th, 2019
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. fn paz(input: &str) -> IResult<&str, String>
  2. {
  3. terminated(map(many0(one_of("ABCDEFGHIJKLMNOPQRSTUVWYYZ")), |v| v.into_iter().collect::<String>()),
  4. nom::character::complete::char(':'))(input)
  5. }
  6. #[test]
  7. fn test_az() {
  8. assert_eq!(paz("ABC:"), Ok(("", "ABC".to_string())));
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement