Adds characters to the left side of a string up to the maximum length.

Input

{{ "1" | lpad: 3 }}

Output

  1

Specifying the padding character

lpad supports an optional character parameter. The character parameter specifies the character used to pad the source string. If not specified, then space will be used.

Input

{{ "1" | lpad: 3, "0" }}

Output

001
© 2014-2026 Cyotek Ltd. All Rights Reserved.
Documentation version 1.8 (buildref #147.16253), last modified 2026-04-11. Generated 2026-04-11 11:51 using Cyotek HelpWrite Professional version 6.20.0