padChar: padChar

Description Usage Arguments Examples

Description

Pad a vector of character strings with a single character to a set length

Usage

1
padChar(string, padlen, filler = "0", padSide = "left")

Arguments

string

A single string or vector of strings

padlen

The desired length of the padded string

filler

A single character that will be used to pad the string

padSide

Which side of the string will be padded, default to 'left' all other values are treated as a right side padding.

Examples

1
2
padChar(c("bob","tool","marks"),5)
padChar(c("bob","tool","marks"),5,"0","right")

drknexus/repsych documentation built on May 15, 2019, 2:19 p.m.