View source: R/parsers_string.R
by_symbol | R Documentation |
Splits a string to individual symbols and then applies the parser p
to the
resulting character vector, otherwise the parser fails. If finish = TRUE
then the parser should completely consume its input. If finish = FALSE
then any remaining part of the string is discarded.
This function is identical to by_split(p, "", finish)
.
by_symbol(p, finish = TRUE)
p |
A parser. |
finish |
logical. Should the parser completely consume the string?
Defaults to |
A parser.
by_split()
by_symbol(exactly(3,literal("a"))) (c("aaa", "bb")) # success
by_symbol(exactly(3,literal("a"))) (c("aaaa", "bb")) # failure
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.