startsWith

startsWith function

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

Description

The startsWith function checks whether string1 starts with string2. Returns true if string1 starts with string2. Returns false otherwise.

Syntax

.startsWith()

(or)

startsWith(,)

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

The startsWith function syntax has the following arguments.

string1 - Required. The main string from which you what to find the start string (str2).

string2 - Required.The start string to be searched for within the main string (str1).

Example

a. In the following example, the startsWith function returns true.

Name = "ZohoCreator";

startsWith(Name,"Zoho") //returns true

 

Name = "ZohoCreator";

Name.startsWith("Zoho") //returns true

 

Related Functions

startsWithIgnoreCase (str1 ,str2) RReturns true if the first argument string starts with the second argument string. Returns false otherwise.
endsWithIgnoreCase (str1 , str2) RReturns true if the first argument string ends with the second argument string. Returns false otherwise.

Share this post : FacebookTwitter

Still can't find what you're looking for?

Write to us: support@zohocreator.com