-
The following code doesn't accept the first character in the provided input: let raw = any()
.ignore_then(text::ident().padded().repeated())
.padded()
.collect::<String>()
.map(Tokens::Raw); So if I were to give an input of |
Beta Was this translation helpful? Give feedback.
Answered by
wackbyte
Apr 3, 2022
Replies: 1 comment 5 replies
-
|
Beta Was this translation helpful? Give feedback.
5 replies
Answer selected by
Vaimer9
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
any().ignore_then(...)
, if you don't want to ignore it, usethen
text::ident().padded().repeated()
outputs a list of strings and thepadded()
ignores the whitespace in between. Thecollect::<String>()
then merges them all into a single string, so:"ello world" -> ["ello", "world"] -> "elloworld"