- :string
pad
align string by adding given padding
Parameters
pad string :string :literal :pathliteral padding :integer
Attributes
center | add padding to both sides | |
right | add right padding | |
with | :char | pad with given character |
Returns
Examples
copypad "good" 10 ; => " good" pad.right "good" 10 ; => "good " pad.center "good" 10 ; => " good "
copya: "hello" pad 'a 10 ; a: " hello"
copypad.with:`0` to :string 123 5 ; => 00123