Both side pad strings the way of pipe operator

string %pad% pad.width

Arguments

string

Character vector or NULL

pad.width

string or .digit where to indicate the pad and width

Value

A character vector or NULL

Details

This functions is a pipe version of stringr::pad

Examples

5 %pad% '.3'
#> [1] " 5 "
5 %rpad% '0.3'
#> [1] "500"