str_locate_braces | R Documentation |
Give the positions of (
, )
, [
, ]
, \{
, \}
within a string.
str_locate_braces(string)
string |
A character vector |
A data frame with 4 columns: string_num
, string
, position
and
brace
. Every extracted brace amount gets its own row in the tibble
detailing the string number and string that it was extracted from, the
position in its string and the brace.
Other locators:
str_locate_nth()
str_locate_braces(c("a{](kkj)})", "ab(]c{}"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.