R: sf_collapse

sf_collapse {stringfish} | R Documentation

## sf_collapse

### Description

Pastes a series of strings together separated by the 'collapse' parameter

### Usage

    sf_collapse(x, collapse)

### Arguments

`x` | A character vector
`collapse` | A single string

### Details

This works the same way as 'paste0(x, collapse=collapse)'

### Value

A single string with all values in 'x' pasted together, separated by 'collapse'.

### See Also

paste0, paste

### Examples

    x <- c("hello", "\\xe4\\xb8\\x96\\xe7\\x95\\x8c")
    Encoding(x) <- "UTF-8"
    sf_collapse(x, " ") # "hello world" in Japanese
    sf_collapse(letters, "") # returns the alphabet

[Package stringfish version 0.12.1 Index]