# NOT RUN {
str_locate_nth(c("abcdabcxyz", "abcabc"), "abc", 2)
str_locate_nth(
c("This old thing.", "That beautiful thing there."),
"\\w+", c(2, -2)
)
str_locate_nth("abc", "b", c(0, 1, 1, 2))
str_locate_first("abcxyzabc", "abc")
str_locate_last("abcxyzabc", "abc")
# }
Run the code above in your browser using DataLab