Learn R Programming

strs (version 0.1.0)

strs_join: Join elements into a single string with a separator

Description

strs_join concatenates elements of iterable using sep. It is similar to Python's str.join().

Usage

strs_join(sep, iterable)

Value

A single string with elements of iterable joined by sep.

Arguments

sep

A string separator used to join the elements.

iterable

A character vector to be joined.

See Also

Examples

Run this code
strs_join("-", c("hello", "world"))
strs_join("", c("hello", "world"))  # no separator

Run the code above in your browser using DataLab