trim {super}R Documentation

Trim a character vector

Description

Almost identical to glue::trim() save a slight difference in error handling for non-character input. This function 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

⁠[character]⁠.

Value

A character vector.

See Also

glue::trim().

Examples

cat(trim("
    A formatted string
    Can have multiple lines
      with additional indentation preserved
    "))

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

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


[Package super version 0.0.3 Index]