powered by
Center all lines of a string relative to console width.
center_string(string, remove_last_break = TRUE, display = FALSE)
A string
(character) Some text to center within console.
(logical) Set to TRUE to remove last line break. Defaults to FALSE.
(logical) Returns string invisibly if FALSE (default), set to TRUE to display returned string
To removes last line break set removelastbreak to TRUE.
removelastbreak
triangle_string(starwars_intro, display = TRUE) %>% center_string() %>% multi_color(direction = "horizontal", recycle_chars = TRUE)
Run the code above in your browser using DataLab