Attoparsec provides the function takeWhile1
that consumes at least one character.
However, there is no analog for takeTill
. How can I implement this function takeTill1
?
Note: This question intentionally shows no research effort as it was answered Q&A-Style.
While this question is similar to this previous one the answer is not the same. I think the missing takeTill1
is a potential hurdle for beginners and this question therefore deserves a separate answer.