Skip to content

PostPad

mapping category: string no `||`

Pads a string at the end with a given character until it reaches the requested size.

Expands the input string to the requested size by appending the padding character. If the input string is already at or above that size, it is returned unchanged.

Parameters

1size Mandatory — accepts: INT

The size the input string should have after padding.

2padChar Optional — accepts: STRING

The character used to pad the string. Defaults to a single space.

Input type

  • STRING

Output type

  • STRING

Requires

  • The padding character can only be a single character and not a string.

Examples

Right-pad to size 5 with zeros

PostPad(5, "0")

Right-pad to size 10 with spaces

PostPad(10)

See also

PrePad, Truncate, Trim, InsertStringAt