From Wikipedia, the free encyclopedia
Content deleted Content added
| Line 1: | Line 1: | ||
|
< |
<>{{#invoke:pad|pad|str={{{str|}}}|len={{{len|0}}}|fill={{{fill|}}}|mode={{{mode|end}}}}}</> |
||
|
<noinclude><code>{{#invoke:pad|pad|str={{{str|}}}|len={{{len|0}}}|fill={{{fill|}}}|mode={{{mode|end}}}}}</code>{{doc}}</noinclude> |
|||
Revision as of 15:21, 18 December 2025
Pads a string to a certain length with a certain fill.
Examples
{{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
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 |

