# NOT RUN {
rbind(
str_pad2("hadley", 30, "left"),
str_pad2("hadley", 30, "right"),
str_pad2("hadley", 30, "both")
)
# All arguments are vectorised except side
str_pad2(c("a", "abc", "abcdef"), 10)
# Longer strings are returned unchanged
str_pad2("hadley", 3)
# }
Run the code above in your browser using DataLab