text module

text::index_of

Find the index of the first occurrence of a substring.

Syntax

RQL

Parameters

NameTypeDescription
valueUtf8The string to search within.
searchUtf8The substring to find.

Return Value

Returns an Integer representing the 0-based index of the first occurrence of the substring, or -1 if not found.

Examples

$ Find index of substring
$ ctrl+enter to run

Related Functions