Pastes a series of strings together separated by the `collapse` parameter
Arguments
- x
A character vector
- collapse
A single string
Value
A single string with all values in `x` pasted together, separated by `collapse`.
Details
This works the same way as `paste0(x, collapse=collapse)`
Examples
x <- c("hello", "\\xe4\\xb8\\x96\\xe7\\x95\\x8c")
Encoding(x) <- "UTF-8"
sf_collapse(x, " ") # "hello world" in Japanese
#> [1] "hello \\xe4\\xb8\\x96\\xe7\\x95\\x8c"
sf_collapse(letters, "") # returns the alphabet
#> [1] "abcdefghijklmnopqrstuvwxyz"