Skip to main content

Overview

The pad transformation pads a string to a target length by adding a fill character at the start or end.

Syntax

pad(<variable>, type="start", expectedLength=10, fill="0")

Parameters

ParameterTypeRequiredDescription
variablestringYesThe string to pad
typestringYesPadding direction: "start" or "end"
expectedLengthnumberYesThe target length of the output string
fillstringYesThe character(s) used to pad the string

Examples

pad(<variable>, type="start", expectedLength=5, fill="0")
pad(<variable>, type="end", expectedLength=20, fill=" ")