Skip to contents

Left or right pad a string with space or other characters in order to get a string of a certain length. This function is a thin wrapper around stringr::str_pad().

Usage

lpad(string, width, pad = " ")

rpad(string, width, pad = " ")

Arguments

string

Character vector to pad.

width

How many characters at minimum in the output.

pad

The string to pad with.