indexOf
Last update: June 2, 2021
- Topics:
- Journeys
CREATED FOR:
- Experienced
- Developer
Checks if the first argument string ends with a specific string (second argument string). If the string is not found, return -1.
Category
String
Function syntax
indexOf(<parameters>)
Parameters
Parameter | Type |
---|---|
string | String |
specified value | String |
Signature and returned type
indexOf(<string>,<string>)
Returns an integer.
Example
indexOf("Hello", "l")
Returns 2.
Explanation:
In “Hello”, the first occurrence of “l” is at position 2.
Previous pageequalIgnoreCase
Next pageisEmpty
Journey Orchestration
- Product documentation
- What’s new
- Starting with Journey Orchestration
- Configuring an event
- Configuring a data source
- Configuring an action
- Using segments
- Building a journey
- Build expressions
- Building your reports
- Integrating with Intelligent Services
- Use cases
- Working with APIs