Explode a character string

x %e% p

Arguments

x

A character string

p

A pattern

Value

a character vector

Details

This function is a pipe version of stringr::str_split for a character string, with simplify = TRUE

Examples

'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"