Left justify a string.

Description

Return str left justified in a string of length width. Padding is done using the specified fillchar (default is an ASCII space). The original string is returned if width is less than or equal to nchar(str).

Usage

1
pystr_ljust(str, width, fillchar = " ")

Arguments

str

A character vector.

width

An integer.

fillchar

A character string.

Value

A character vector.

References

https://docs.python.org/3/library/stdtypes.html#str.ljust

See Also

pystr_rjust

Examples

1
2
pystr_ljust("left", 10)
pystr_ljust("left", 10, "*")

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.