Creator Help

endsWith - String Function

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

Description

The endsWith function checks whether string1 ends with string2. Returns true if string1 ends with string2. Returns false otherwise.  

Syntax

<string1>.endsWith<string2>

(or)

endsWith(str1 , str2)

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

The endsWith function syntax has the following arguments.

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

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

Example

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

    

Name = "ZohoCreator";

endsWith(Name,"Creator") //returns true 



    

Name = "ZohoCreator";

Name.endsWith("Creator") //returns true 



Related Functions

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

Top