strpad: Pad a string to a specified length with a padding character.

Description Usage Arguments Value Author(s) Examples

View source: R/strpad.R

Description

Pad a string to a specified length with a padding character.

Usage

1
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 <[email protected]>

Examples

1
strpad(1:5, width = 4, pad = "0")

tmcn documentation built on June 20, 2017, 3 p.m.

Related to strpad in tmcn...