padding {cwhmisc} | R Documentation |
padding
Pads a string.
padding(str, space, with, to=c("left","right","center"))
str |
String to be padded. |
space |
Resulting length of padded string. |
with |
String to pad with. Will be repeated as often as necessary. |
to |
Mode of padding, one of "left","right","center". |
A string
Christian W. Hoffmann <c-w.hoffmann@sunrise.ch>
http://www.wsl.ch/personal_homepages/hoffmann/index_EN
padding("My string",25,"XoX","center") # [1] "XoXXoXXoMy stringXXoXXoXX"