strs_join
concatenates elements of iterable
using sep
. It is similar to
Python's str.join()
.
Arguments
- sep
A string separator used to join the elements.
- iterable
A character vector to be joined.
Value
A single string with elements of iterable
joined by sep
.
Examples
strs_join("-", c("hello", "world"))
#> [1] "hello-world"
strs_join("", c("hello", "world")) # no separator
#> [1] "helloworld"