startsWith()
Table of Contents
Overview
The startsWith() function takes a string and a searchString as arguments. It returns True if searchString is found at the beginning of the string. Otherwise, it returns False.
Note: This function performs a case-sensitive search.
Return Type
- Boolean
Syntax
<variable> = <string>.startsWith( <searchString> );
(OR)
<variable> = startsWith( <string>, <searchString> );
Parameter | Description | Data type |
---|---|---|
<variable> | Variable which will contain the returned boolean value. | BOOLEAN |
<string> | The main string which may start with the searchString. | TEXT |
<searchString> | The searchString with which the main string may start. | TEXT |
Examples
Product="Zoho Creator";
var = startsWith(Product, "Zoho"); //returns true
Product="Zoho Creator";
var = startsWith(Product, "zoho"); //returns false
var = startsWith(Product, "Zoho"); //returns true
Product="Zoho Creator";
var = startsWith(Product, "zoho"); //returns false