© Copyright 2023, Astera Software
Name | PadLeft |
Syntax | PadLeft (String str, String padChar, Integer length) |
Purpose | To pad a string to the left with the specified character. |
Description | Returns the characters in string padded to the left. Length of string is equal to length size. This method does not truncate the original string so if the original string is larger than specified length, the entire original string is returned. |
Return Type | String |
Parameters | Str [System.String] – String which will be padded to the right padChar [System.String] – A character string whose first character will be used to pad the string length [System.Int64] – Length of the output string |
Example
In this example, we are passing the required parameters to the function transformation object using a Variables object.
Where,
str = ABC
padChar = -
length = 10
Right-click on the function transformation object and select Preview Output. You can see that Astera Data Stack has returned the padded string of the specified length.