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