padding {cwhmisc}R Documentation

Padding a string with justification

Description

padding Pads a string.

Usage

padding(str, space, with, to=c("left","right","center"))

Arguments

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

Value

A string

Author(s)

Christian W. Hoffmann <c-w.hoffmann@sunrise.ch>
http://www.wsl.ch/personal_homepages/hoffmann/index_EN

Examples

padding("My string",25,"XoX","center")
 # [1] "XoXXoXXoMy stringXXoXXoXX"

[Package cwhmisc version 2.0.1 Index]