strpad {tmcn} | R Documentation |
Pad a string to a specified length with a padding character.
Description
Pad a string to a specified length with a padding character.
Usage
strpad(string, width = 0, side = c("left", "right", "both"),
pad = " ")
Arguments
string |
A character vector. |
width |
The number of characters of the string after padding. |
side |
Which side to pad. |
pad |
The padding character. |
Value
A character vector after padding.
Author(s)
Jian Li <rweibo@sina.com>
Examples
strpad(1:5, width = 4, pad = "0")
[Package tmcn version 0.2-13 Index]