Dependency-free drop-in alternative for stringr::str_pad()
.
str_pad(
string,
width,
side = c("left", "right", "both"),
pad = " ",
use_width = TRUE
)
A character vector.
Input vector. Either a character vector, or something coercible to one.
Minimum width of padded strings.
Side on which padding character is added (left, right or both).
Single padding character (default is a space).
If FALSE
,
use the length of the string instead of the width;
see str_width()
/str_length()
for the difference.
Eli Pousson eli.pousson@gmail.com (ORCID)
Alexander Rossell Hayes alexander@rossellhayes.com (ORCID)