removeLastOccurence()
Table of Contents
Overview
The removeLastOccurence() function takes string and searchString as arguments. It returns the string after removing the last occurrence of searchString from it.
If the searchString is not present in the string, it will return the string as it is.
Note: This function performs a case-sensitive search.
Return Type
- Text
Syntax
<variable> = <string>.removeLastOccurence(<searchString>);
(OR)
<variable> = removeLastOccurence( <string>, <searchString>);
Parameter | Description | Data type |
---|---|---|
<variable> | Variable which will contain the returned string. | TEXT |
<string> | The string from which the searchString's last occurrence will be removed. | TEXT |
<searchString> |
| TEXT |
Examples
Product="Create an app using Zoho Creator app builder";
newText = Product.removeLastOccurence("app");
// returns "Create an app using Zoho Creator builder"
// returns "Create an app using Zoho Creator builder"