Creator Help

leftpad

This topic describes the syntax and usage of the leftpad functon in Zoho Creator .

Description

The leftpad function returns the input string with whitespace characters padded to the left of the string. You specify the String that you'd like to pad left and the total size of the finished String. 

Syntax

leftpad(str1,size)

The leftpad function syntax has the following arguments.

str1 - Required. The string to be padded.

size - Required. The total size of the finished string.


Note: This function is supported only in free-flow scripting mode of Script Builder.

Example

leftpad("Pad me", 10)      //would return "    Pad me" whose length is 10

Top