powered by
Turn strings into triangle-shaped strings
triangle_string(string, maxlen = 1, step = 1, display = FALSE)
A string
(character) Some text to reshape into a triangle.
(integer) Width of top of triangle. Defaults to 1. Set larger than 1 for downward-pointing triangle.
(integer) Number of characters to expand or contract triangle width per line (set to negative for downward-pointing triangle)
(logical) Returns string invisibly if FALSE (default), set to TRUE to display returned string
Use positive step argument for upward pointing triangle and negative step and wider maxlen for downward pointing triangle.
triangle_string("hellooooooooooooooooooooooooooooooooooooooooooooooooooo world") %>% multi_color()
Run the code above in your browser using DataLab