Skip to main content Skip to complementary content
  • New archived content: Talend MDM, Talend Data Catalog 8.0, and Talend 7.3 products reached their end of life in 2024. Their documentation was moved to the Talend Archive page and will no longer receive content updates.
Close announcements banner

indexOf

Returns the index of the second argument if it appears in the first, otherwise it returns -1.

The first index is 0. Any data type can be used. Types other than string are converted to string before the function is applied. If the first argument is in bytes, the second one should be in bytes or a hex string with the prefix 0x or 0X.

Arguments

  1. Input string.
  2. String to search for.

Examples

Expression Result
indexOf("abcd", "d") 3

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!