Explode a character string
x %e% p
x | A character string |
---|---|
p | A pattern |
a character vector
This function is a pipe version of stringr::str_split for a character string, with simplify = TRUE
'The little horse under the weather' %e% ' '#> [1] "The" "little" "horse" "under" "the" "weather"'The little horse under the weather' %e% ''#> [1] "T" "h" "e" " " "l" "i" "t" "t" "l" "e" " " "h" "o" "r" "s" "e" " " "u" "n" #> [20] "d" "e" "r" " " "t" "h" "e" " " "w" "e" "a" "t" "h" "e" "r"