Onetastic Macro Documentation >
>
>
String_Pad String_Pad
Pads a string to a certain length with another string and returns the resulting string.
Syntax
String String_Pad(
String string,
String padString,
Numeric length,
String padDirection)
Parameters
- String string
- String to be padded with padString.
- String padString
- String to pad with.
- Numeric length
- String will be at this length after padding. If this is smaller than the length of the original string, no padding happens.
- String padDirection
- Direction of the padding. Can be "left", "right" or "both".
Examples
String_Pad("pqrst", "AB", 10, "right")
String_Pad("pqrst", "AB", 10, "left")
String_Pad("pqrst", "AB", 10, "both")
|