x <- "This is a sentence."
str_split(x, boundary("word"))
#> [[1]]
#> [1] "This" "is" "a" "sentence"
str_count(x, boundary("word"))
#> [1] 4
str_extract_all(x, boundary("word"))
#> [[1]]
#> [1] "This" "is" "a" "sentence"
and other functions from stringr package