Left pad strings the way of pipe operator

string %lpad% pad.width

Arguments

string

Character vector or NULL

pad.width

string or .digit where to indicate the pad and widht

Value

A character vector or NULL

Details

This functions is a pipe version of stringr::pad

Examples

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] "ééééé"