INDEX_OF_IGNORE_CASE

Description

Returns the zero-based index of the first occurrence of substring within string(case-insensitive). Optionally starts searching from index_optional. Returns -1 if not found.

Syntax

INDEX_OF_IGNORE_CASE(string, substring, index_optional) -> Integer

Parameters

ParameterData TypeRequiredDescription
stringStringYesThe string to search within.
substringStringYesThe substring to locate.
index_optionalIntegerNoThe starting index for the search (zero-based). Defaults to 0.

Examples

INDEX_OF_IGNORE_CASE("Sales_Report.XLSX", ".xlsx")
-- Returns 12.
INDEX_OF_IGNORE_CASE("Voltage=220V", "Temperature=")
-- Returns -1.
INDEX_OF_IGNORE_CASE("Report.Q1.Final.PDF", ".pdf", 10)
-- Returns 15. Finds the first occurrence of ".pdf" starting from index 10 (case-insensitive).