Functions Language

SubStr

The SubStr() function returns a portion of a string. It uses zero based indexing, meaning the first character of a string is at position 0.


Syntax:

SubStr(Text, Start, Length)
  • In the Quintessence Editor (Studio) using Python language, use: Qx.SubStr()
 See parameter descriptions

TextThe input text string.
StartThe zero based starting position of the substring.
LengthThe number of characters to return.

Remarks:

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

Examples:

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

> Example 1: Retrieve part of a string at a specific location


Formula:

return := SubStr("ABCDEFG", 3, 2);

Result:

DE