String Intrinsic Functions - RightAdjust Method

Right adjust the string

Member of String Intrinsic Functions (PRIM_LIBI.ICommonStringIntrinsics)


NameTypeData TypeDescription
Result*Result (Optional)StringResult of the right adjustment
Length*Input (Optional)IntegerNumber of bytes to right adjust
Pad*Input (Optional)StringPad 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" )

See also

All Component Classes

Technical Reference

Febuary 18 V14SP2