Learn R Programming

stringb (version 0.1.17)

text_pad: padding text to specified width

Description

padding text to specified width

text_wrap default

Usage

text_pad(
  string,
  width = max(nchar(string)),
  pad = " ",
  side = c("left", "right", "both", "l", "r", "b", 1, 2, 3)
)

# S3 method for default text_pad( string, width = max(nchar(string)), pad = " ", side = c("left", "right", "both", "l", "r", "b", 1, 2, 3) )

Arguments

string

text to be wrapped

width

width text should have after padding; defaults to: max(nchar(string))

pad

the character or character sequence to use for padding

side

one of: c("left", "right", "both", "l", "r", "b", 1, 2, 3)