It would come handy if various String methods which require search "needle" arguments, in addition to a string needle also accepted a list (an Array) of needles, like
-- is this a JPEG file? if s~caselessEndsWith((".jpg", ".jpeg") then ...
The list should be interpreted as OR or ANY OF.
Affected methods could include startsWith, endsWith, contains, containsWord, pos, lastPos, countStr and their respective caseless variants.
Anonymous
I only have two reservations with this:
1) While useful, I think as a practical matter one would also want to know which item is a hit.
2) Argument processing rules can get a bit dicey because strings and arrays are symmetrical with request('String') and request('Array')