strs_ljust {strs} | R Documentation |
Left-justify string in a field of a given width
Description
strs_ljust
left-justifies each element of a character vector in a field of
a specified width. It is similar to Python's str.ljust()
method.
Usage
strs_ljust(string, width, fillchar = " ")
Arguments
string |
A character vector where each element is a string to be left-justified. |
width |
The total width of the field in which the string is to be left-justified. |
fillchar |
A character used for padding on the right. |
Value
A character vector of the same length as string
, with each element
left-justified in a field of the specified width.
See Also
Python str.ljust() documentation
Examples
strs_ljust("hello", 10)
strs_ljust("world", 10, "*")
[Package strs version 0.1.0 Index]