Right adjust the string
Member of Compatible Unicode Intrinsic Functions (PRIM_LIBI.ICompatibleUnicodeIntrinsics)
Name | Type | Data Type | Description |
---|---|---|---|
Result | *Result (Optional) | Unicode String | Result of the right adjustment |
Length | *Input (Optional) | Integer | Number of bytes to right adjust |
Pad | *Input (Optional) | Unicode String | Pad character used to replace blanks in the result |
RightAdjust shifts the value in a string as far to the right as allowed by either the length parameter or the string's length, whichever is smaller. The left of the value is filled with the contents of the pad parameter, or blank spaces if the pad isn't provided.
Using the following 2 field definitions
define field(#source) type(*string) length(10) define field(#target) type(*string) length(10)
In this example, #target will be set to " abc".
#source := "abc" #target := #source.RightAdjust
In this example, #target will be set to "xxabc".
#source := "abc" #target := #source.RightAdjust( 5, "x" )
Febuary 18 V14SP2