Flatten a string
str_flatten(string, collapse = "")
string | Character to flatten |
---|---|
collapse | String to insert between each piece |
A character vector of length 1
str_flatten(letters)#> [1] "abcdefghijklmnopqrstuvwxyz"str_flatten(letters, "-")#> [1] "a-b-c-d-e-f-g-h-i-j-k-l-m-n-o-p-q-r-s-t-u-v-w-x-y-z"