|
A function that can be used in Formulas.
index_caseInsensitive
(string$
, part$
)
part$
inside string$
, or 0 if not found.index_caseInsensitive
(strings$#
, s$
)
s$
first occurs in strings$#
.For determining where the substring is located, it doesn’t matter whether string$
and/or part$
are in lower case or upper case. Here is a comparison with index
:
assert index ("hello", "L") = 0
assert index_caseInsensitive ("hello", "L") = 3
assert index ("heLlo", "L") = 3
assert index_caseInsensitive ("heLlo", "L") = 3
assert index ("helLo", "L") = 4
assert index_caseInsensitive ("helLo", "L") = 3
assert index ("heLLo", "L") = 3
assert index_caseInsensitive ("heLLo", "L") = 3
rindex_caseInsensitive
for the last occurrenceindex
for case-sensitive matching© Paul Boersma 2023