RAD function: stradj

A RAD function that ensures a string is a specific length by removing or adding trailing blanks.

Function

stradj

Format

$L.void=stradj($string, $size)

Parameters

The following parameters are valid for the stradj function:

Parameter Data type Description
$L.void= Not applicable A syntax requirement only, which does not affect the outcome of the function.
$string String The string being modified.
$size Number The desired size of $string.

Examples

$string="Hewlett-Packard"
$size=15
$L.void=stradj($string, $size)

After execution, the value of $string is Hewlett-Packard.

$string="Hewlett-Packard"
$size=10
$L.void=stradj($string, $size)

After execution, the value of $string is Hewlett-Pa.