FixRight

This function pads a raw string to the right with a specified character until the specified length is reached. If the optional 3rd parameter is not specified, spaces are used. (This is not specifically a Dynamic Array command but is commonly used to manipulate them.)

Group: Dynamic Array Extensions


Syntax: vValue = FixRight(vStringData, vChars, [vPadChar])

vValue           (Variant) is the padded string value

vStringData    (Variant) is the string containing the raw data

vChars           (Variant) is the total size of the resulting string

vPadChar       (Variant) Optional – is the pad character to use. If none is specified, spaces are used

Example:

Rsp = FixRight(Rsp, 8, "A")

If Rsp was “123” then Rsp becomes “AAAAA123” because it puts the character ‘A’ as many times as necessary before the Rsp value until the length of Rsp is 8, left justifying the StringData value.