|
A function that can be used in Formulas.
rindex_caseInsensitive
(string$
, part$
)
part$
inside string$
, or 0 if not found.rindex_caseInsensitive
(strings$#
, s$
)
s$
last 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 rindex
:
assert rindex ("hello", "L") = 0
assert rindex_caseInsensitive ("hello", "L") = 4
assert rindex ("heLlo", "L") = 3
assert rindex_caseInsensitive ("heLlo", "L") = 4
assert rindex ("helLo", "L") = 4
assert rindex_caseInsensitive ("helLo", "L") = 4
assert rindex ("heLLo", "L") = 4
assert rindex_caseInsensitive ("heLLo", "L") = 4
index_caseInsensitive
for the first occurrencerindex
for case-sensitive matching© Paul Boersma 2023