IndexOf
The IndexOf() function returns the position of a text within another text.
It will return 0 if the searched text was not found.
This function is NOT case-sensitive.
This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.
WEM functions are 1-based where it concerns position parameters: 1 is the first position.
Returns the position as a numeric value where the searched text is found within the source.
The index of the first character is 1, the second character is 2, etc. (1-based).
Returns 0 if the searched text is not found within the source.
Syntax
IndexOf(source, search)
IndexOf("In this bit of text, we are searching 4 some answers, so where is it?", "searching 4")
=> 29
Parameters
source
text
☑️
the source in which the function will search for the search text
search
text
☑️
the text to search for
Last updated
Was this helpful?