Skip to main content Skip to complementary content
Close announcements banner

IndexOf

The IndexOf function returns the one-based index of the Compare String within the specified String. For example, if the String is abcd, and the Compare String is cd, 3 is returned. If the Compare String is not found, then -1 is returned.

Arguments

String Specify the input value to process.
Compare String Specify the substring to process.

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 – let us know how we can improve!