Vectorised over string, width and pad. This is an internal function doing the same thing of stringr::str_pad (except for parameters 'width' and 'length' which must be of length 1), but without depending on package stringi.

str_pad2(string, width, side = c("left", "right", "both"), pad = " ")

## Arguments

string A character vector. Minimum width of padded strings. Side on which padding character is added (left, right or both). Single padding character (default is a space).

## Value

A character vector.

## Examples

rbind(
#> "hadley"