Handlebar Helper Function: IndexOf

Returns the character position where a search string exists within a subject string. The search is case-insensitive and uses 1-based indexing.

Availability 

This helper is available in the Winter ’26 release of Marketing Cloud Next (API version 65.0).

Syntax 

1{{indexOf subject search}}

Parameters 

ParameterTypeDescription
subjectStringRequired. The string to search within.
searchStringRequired. The string to find within the subject.

Return Value 

The function returns the 1-based position where the search string is found in the subject string. If the search string isn’t found or if either parameter is null, it returns 0. The search is case-insensitive.