forked from extern/nushell
bff81f24aa
* Autogenerate missing docs * Update ansi.md * Rename question mark command docs * Delete empty?.md
783 B
783 B
str lpad
pad a string with a character a certain length
Usage
> str lpad ...args {flags}
Parameters
- ...args: optionally check if string contains pattern by column paths
Flags
- -h, --help: Display this help message
- -l, --length (required parameter): length to pad to
- -c, --character (required parameter): character to pad with
Examples
Left pad a string with a character a number of places
> echo 'nushell' | str lpad -l 10 -c '*'
Left pad a string with a character a number of places
> echo '123' | str lpad -l 10 -c '0'
Use lpad to truncate a string
> echo '123456789' | str lpad -l 3 -c '0'
Use lpad to pad Unicode
> echo '▉' | str lpad -l 10 -c '▉'