enclose: Enclose String with Specified Characters

View source: R/character.R

encloseR Documentation

Enclose String with Specified Characters

Description

This function encloses a string with specified characters on the left and the right.

Usage

enclose(x, left, right)

Arguments

x

A character string to enclose.

left

A character string to prepend.

right

A character string to append.

Value

A new character string with x enclosed by left and right.

Examples

enclose("text", "[", "]") # returns "[text]"

FastUtils documentation built on Sept. 11, 2024, 5:13 p.m.