NOTE: only works for string data types, and you may want to modify the separator to suit your needs (it should be something that WON'T be in any of the strings)
CODE
/*//-- Get First Index in List Source of any of List Test --//*/
integer uMatchLstIdxFwd( list vLstSrc, list vLstTst ){
return ((llParseString2List(
llList2String(
llParseStringKeepNulls(
llDumpList2String( vLstSrc, ";" ),
vLstTst, [] ),
0 ),
(list)";", [] ) != []) + 1) %
((vLstSrc != []) + 1) - 1;
}
CODE
/*//-- Get Last Index in List Source of any of List Test --//*/
integer uMatchLstIdxRev( list vLstSrc, list vLstTst ){
return (vLstSrc != []) -
(llParseString2List(
llList2String(
llParseString2List(
llDumpList2String( vLstSrc, ";" ),
vLstTst, [] ),
-1 ),
(list)";",
[] ) != []) - 1;
}
neither is fully checked for micro optimizations