trim {glue}R Documentation

Trim a character vector

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

trim(x)

Arguments

x

A character vector to trim.

Examples

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
    ")

[Package glue version 1.3.0 Index]