Unicode Intrinsic Functions - RightAdjust Method

Right adjust the string

Member of Unicode Intrinsic Functions (PRIM_LIBI.IUnicodeIntrinsics)

Parameters

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

Details

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.

Example

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" )

See also

All Component Classes

Technical Reference

LANSA Version 15, April 2020