forked from extern/nushell
c0a1d18e3d
* feat: update #4455, regenerate commands' docs * chore: update make_docs script
715 B
715 B
title | layout | version |
---|---|---|
str lpad | command | 0.59.0 |
pad a string with a character a certain length
Signature
> str lpad ...rest --length --character
Parameters
...rest
: optionally check if string contains pattern by column paths--length {int}
: length to pad to--character {string}
: character to pad with
Examples
Left pad a string with a character a number of places
> 'nushell' | str lpad -l 10 -c '*'
Left pad a string with a character a number of places
> '123' | str lpad -l 10 -c '0'
Use lpad to truncate a string
> '123456789' | str lpad -l 3 -c '0'
Use lpad to pad Unicode
> '▉' | str lpad -l 10 -c '▉'