trim: Trim a character vector

Description Usage Arguments Examples

View source: R/glue.R

Description

This trims a character vector according to the trimming rules used by glue. These follow similar rules to Python Docstrings, with the following features.

Usage

1
trim(x)

Arguments

x

A character vector to trim.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
glue("
    A formatted string
    Can have multiple lines
      with additional indention preserved
    ")

glue("
  \\ntrailing or leading newlines can be added explicitly\\n
  ")

glue("
    A formatted string \\
    can also be on a \\
    single line
    ")

tidyverse/glue documentation built on Jan. 11, 2019, 12:13 p.m.