>

INDEXOF

Description

Returns the position of the first occurrence of a search string in a string field, when searching forward from the start index.

Syntax

INDEXOF(string, search_string, start_index)

Arguments

  string - string expression

  search_string - string expression to search for

  start_index - integer index to start the search (string index starts at 0).

Examples

INDEXOF('What wonderful weather in a wonderful world','wonderful',15) returns 28.

Notes

The startIndex begins at 0.

If the search string is not found, -1 is returned.

Return value datatype

Int

Impact of null value

If any (or all) inputs are null, returns null.