strs_join: Join elements into a single string with a separator

View source: R/join.R

strs_joinR Documentation

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)

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.

See Also

Python str.join() documentation

Examples

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

strs documentation built on Sept. 11, 2024, 6:44 p.m.