Functions Language

IndexOf

The IndexOf() function locates one text string within another and returns the zero based position of the located text (zero based means the first character of the string is in position 0).


Syntax:

IndexOf(MainText, FindText)
  • In the Quintessence Editor (Studio) using Python language, use: Qx.IndexOf()
 See parameter descriptions

MainTextThe input string to search.
FindTextThe text to locate within the main string.

Remarks:

  • IndexOf() is an older function and is interchangeable with the Excel Find() function. It is recommended to use Find() instead of IndexOf().

Examples:

The examples provided below are based on fictitious data for illustrative purposes only.

> Example 1: Find the index of a specific string within another string


Formula:

return := IndexOf("Company: ABC Retirement Fund", "ABC"); 

Result:

9