wrap_chr: Wrap character in character

wrap_chrR Documentation

Wrap character in character

Description

Wraps a character vector x in another character vector wrap (by default the string ⁠"⁠).

Usage

wrap_chr(x, wrap = "\"")

Arguments

x

A character vector or something coercible to. Will be fed to as_chr() before wrapping.

wrap

Character sequence x is to be wrapped in. A character vector or something coercible to.

Value

A character vector of the same length as wrap.

See Also

Other string functions: as_chr(), as_comment_str(), as_line_feed_chr(), as_str(), capitalize_first(), dsv_colnames(), enum_str(), escape_lf(), fuse_regex(), prettify_nr(), sentenceify()

Examples

mtcars |>
  colnames() |>
  pal::wrap_chr(wrap = "`") |>
  magrittr::set_colnames(x = mtcars) |>
  pal::pipe_table()

salim-b/pal documentation built on Feb. 28, 2025, 6:51 p.m.