Creator Help

trim

This topic describes the syntax and usage of the trim function in Zoho Creator .

Description

The trim function returns a copy of the string, with leading and trailing whitespace omitted.

Syntax

<string>.trim()

trim(string)

// this format is supported only in the free flow scripting mode of Script builder.

The trim function syntax has the following arguments.

string - Required. The main string to be trimmed. 

Return Value

Returns a copy of this string with leading and trailing white space removed, or this string if it has no leading or trailing white space.

Example

Name = "Welcome to Zoho Creator";

Name.trim();    //returns "Welcome to Zoho Creator";

Name = "Welcome    to Zoho Creator";

trim(name);    //returns "Welcome to Zoho Creator";

Top