center_string: Center all lines of a string relative to console width.

Description Usage Arguments Details Value Examples

View source: R/textshapes.R

Description

Center all lines of a string relative to console width.

Usage

1
center_string(string, remove_last_break = TRUE, display = FALSE)

Arguments

string

(character) Some text to center within console.

remove_last_break

(logical) Set to TRUE to remove last line break. Defaults to FALSE.

display

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

Details

To removes last line break set removelastbreak to TRUE.

Value

A string

Examples

1
2
3
triangle_string(starwars_intro, display = TRUE) %>%
  center_string() %>%
  multi_color(direction = "horizontal", recycle_chars = TRUE)

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