Template:Str pad
Jump to navigation
Jump to search
| This template uses Lua: |
Pads a string to a certain length with a certain fill.
Examples
[edit source]{{str pad|str=a|len=10|fill=b}} → abbbbbbbbb
{{str pad|str=a|len=10|fill=b|mode=start}} → bbbbbbbbba
{{str pad|str=a|len=10|fill=ab|mode=start}} → ababababaa
Template Data
[edit source]Pads a string to a certain length with a certain fill.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| str | str | The string to pad
| String | optional |
| len | len | The length of the padded string
| Number | optional |
| fill | fill | The padder string
| String | optional |
| mode | mode | The mode to use for padding
| String | optional |