LAST_INDEX_OF_IGNORE_CASE
Description
Returns the starting position (zero-based index) of the last occurrence of substring within string, ignoring case differences. If end_position_optional is provided, the search considers characters from the start of the string up to the specified end position. Returns -1 if the substring is not found.
Syntax
LAST_INDEX_OF_IGNORE_CASE(string, substring, end_position_optional) -> Integer
Parameters
| Parameter | Data Type | Required | Description |
|---|---|---|---|
| string | String | Yes | The string to search within. |
| substring | String | Yes | The substring to locate. |
| end_position_optional | Integer | No | The zero-based index indicating the end position for the search. If omitted, searches the entire string. |
Examples
LAST_INDEX_OF_IGNORE_CASE("Status_OK|Status_Fail|Status_Pending", "STATUS", 20)
-- Returns 10. Finds "Status" within the first 20 characters (case-insensitive).LAST_INDEX_OF_IGNORE_CASE("Error: Info, Error: Warn, Error: Critical", "error")
--Returns 26. Finds "Error" at index 26 (case-insensitive).