powered by
Pad a string to a specified length with a padding character.
strpad(string, width = 0, side = c("left", "right", "both"), pad = " ")
A character vector.
The number of characters of the string after padding.
Which side to pad.
The padding character.
A character vector after padding.
# NOT RUN { strpad(1:5, width = 4, pad = "0") # }
Run the code above in your browser using DataLab