padding: Pad string with space or other characters

paddingR Documentation

Pad string with space or other characters

Description

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.


torfason/zulutils documentation built on Aug. 21, 2023, 5:46 p.m.