PadL function

Official Content
This documentation is valid for:

To allow building a character expression from a different one, by adding N times, a specified character, or blanks, to the left. Notice all leading spaces from the original string will be removed before applying the function. The implementation of the function starts with the following code:

PadL(string text, int size, string fill)
    String trimText = new String(ltrim(text));
    ... // continue function

Syntax

Padl(Str, Len [,FillChar])

Type returned
Character

Where:
Str 
   Is the character expression from which you want to add left blanks or with the FillChar if indicated

Len 
   Is the numeric expression that indicates the length of the returned string.

FillChar 
   Is the caracter added on the left of ‘Str’. It is an optional parameter, if it is not specified, then blanks will be added.

Description

Returns a character string, aligned on the right, which is the result of concat the specified ‘FillChar’ , ‘len’ times on the left of the ‘Str’  specified for the function.

Examples

PadL(“My string”, 14) = “     My string”
PadL(“My string”, 14, ‘*’) = “*****My string”

Scope

Objects  Procedure object, Transaction object, Web Panel object

See also

PadLeft Method
PadR function
Trim function
LTrim function
RTrim Function




Was this page helpful?
What Is This?
Your feedback about this content is important. Let us know what you think.