leftpad()
Table of Contents
Overview
The leftpad() function takes text and whitespaces as arguments. It returns the text, left-padded with white spaces equal to the specified number.
Return Type
- Text
 
Syntax
<variable> = <text>.leftpad( <whitespaces>);
(OR)
<variable> = leftpad(<text>, <whitspaces> );
| Parameter | Data type | Description | 
|---|---|---|
| <variable> | TEXT | Variable that will contain the returned text. | 
| <text> | TEXT | The text that will be left-padded with white spaces. | 
| <whitespaces> | NUMBER | Total number of whitespaces that need to be padded. Note: A negative value will return the string without any changes. Maximum value: 100,00  | 
Examples
text = "Left";
newText = text.leftpad(6);
//returns " Left"
newText = text.leftpad(6);
//returns " Left"