RAD function: strpadl

A RAD function that pads a string with leading blanks until the string is a specified size.

Function

strpadl

Format

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

Parameters

The following parameters are valid for the strpadl function:

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

Example

$string="Hewlett-Packard"
$size=20
$L.void=strpadl($string, $size)

After execution, value of $string is (space)(space)(space)(space)(space)Hewlett-Packard.