mirror of
https://github.com/nushell/nushell.git
synced 2024-12-26 08:59:12 +01:00
8c0a2d3c15
* Finish updating * a couple improvements * Update renames * cleanup examples
718 B
718 B
title | layout | version |
---|---|---|
str rpad | command | 0.59.0 |
pad a string with a character a certain length
Signature
> str rpad ...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
Right pad a string with a character a number of places
> 'nushell' | str rpad -l 10 -c '*'
Right pad a string with a character a number of places
> '123' | str rpad -l 10 -c '0'
Use rpad to truncate a string
> '123456789' | str rpad -l 3 -c '0'
Use rpad to pad Unicode
> '▉' | str rpad -l 10 -c '▉'