pystr_center: Center a string.

Description Usage Arguments Details Value References See Also Examples

View source: R/pystr_center.R

Description

Return str centered in a string of length width.

Usage

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

Arguments

str

A character vector.

width

An integer.

fillchar

A character string.

Details

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).

Value

A character vector.

References

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

See Also

pystr_ljust, pystr_rjust

Examples

1
2
pystr_center("center me", 15)
pystr_center("center me", 15, "*")

nicolewhite/pystr documentation built on May 23, 2019, 5:09 p.m.