triangle_string: Turn strings into triangle-shaped strings

Description Usage Arguments Details Value Examples

View source: R/textshapes.R

Description

Turn strings into triangle-shaped strings

Usage

1
triangle_string(string, maxlen = 1, step = 1, display = FALSE)

Arguments

string

(character) Some text to reshape into a triangle.

maxlen

(integer) Width of top of triangle. Defaults to 1. Set larger than 1 for downward-pointing triangle.

step

(integer) Number of characters to expand or contract triangle width per line (set to negative for downward-pointing triangle)

display

(logical) Returns string invisibly if FALSE (default), set to TRUE to display returned string

Details

Use positive step argument for upward pointing triangle and negative step and wider maxlen for downward pointing triangle.

Value

A string

Examples

1
2
triangle_string("hellooooooooooooooooooooooooooooooooooooooooooooooooooo world") %>%
  multi_color()

multicolor documentation built on Nov. 4, 2021, 5:06 p.m.