Left pad strings the way of pipe operator
string %lpad% pad.width
string | Character vector or NULL |
---|---|
pad.width | string or .digit where to indicate the pad and widht |
A character vector or NULL
This functions is a pipe version of stringr::pad
5 %lpad% '0.5'#> [1] "00005"5 %lpad% .5#> [1] "00005"5 %lpad% '.5'#> [1] " 5"5 %lpad% '2.5'#> [1] "22225"'é' %lpad% 'é.5'#> [1] "ééééé"