Skip to contents

[Deprecated]
This function has been deprecated in favor of the more powerful enum_str() (which builds upon cli::ansi_collapse()) and will be removed in the future.

Usage

prose_ls(x, wrap = "", sep = ", ", last_sep = " and ")

Arguments

x

A vector or a list.

wrap

String (usually a single character) in which x is to be wrapped.

sep

Separator to delimit the elements of x.

last_sep

Separator to delimit the second-last and last element of x.

Value

A character scalar.

Details

Takes a vector or list and concatenates its elements to a single string separated in prose-style.

Examples

pal::prose_ls(1:5)
#> [1] "1, 2, 3, 4 and 5"