col_align {crayon} | R Documentation |
Align an ANSI colored string
Description
Align an ANSI colored string
Usage
col_align(
text,
width = getOption("width"),
align = c("left", "center", "right"),
type = "width"
)
Arguments
text |
The character vector to align. |
width |
Width of the field to align in. |
align |
Whether to align |
type |
Passed on to |
Value
The aligned character vector.
See Also
Other ANSI string operations:
col_nchar()
,
col_strsplit()
,
col_substr()
,
col_substring()
Examples
col_align(red("foobar"), 20, "left")
col_align(red("foobar"), 20, "center")
col_align(red("foobar"), 20, "right")
[Package crayon version 1.5.3 Index]