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_env_var_name(), as_line_feed_chr(), as_str(), capitalize_first(), dsv_colnames(), enum_str(), escape_lf(), fuse_regex(), phrase_nr(), sentenceify()

Examples

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

salim-b/pal documentation built on June 9, 2025, 12:39 a.m.