Choose where you’d like to start

removeFirstOccurence()

Overview

The removeFirstOccurence() function takes string and searchString as arguments. It returns the string after removing the first 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>.removeFirstOccurence(<searchString>);

(OR)

<variable> = removeFirstOccurence(<string>, <searchString>);
ParameterDescriptionData type
<variable>Variable which will contain the returned string.TEXT
<string>The string from which the first occurrence of the searchString will be removedTEXT
<searchString>


The searchString whose first occurrence will be removed from the string.

TEXT

Examples

Product="Zoho Creator 5";
newText = Product.removeFirstOccurence("5");          
// returns "Zoho Creator "
 

Get Started Now

Execute