User:Vegas Silverweb/vsListFindList
< User:Vegas Silverweb
Jump to navigation
Jump to search
Revision as of 14:57, 21 April 2010 by Vegas Silverweb (talk | contribs) (Created page with 'Like ListFindList but tries for match based on implicit cast to string, so works pretty good for everything except vectors and rotations initialized in-place with integers. <lsl...')
Like ListFindList but tries for match based on implicit cast to string, so works pretty good for everything except vectors and rotations initialized in-place with integers.
<lsl> integer vsListFindList(list haystack,list needle) {
integer i; integer j = llGetListLength(haystack); string s = llList2String(needle,0); for(i=0;i<j;i++) { if(llList2String(haystack,i)==s) return i; } return -1; }
</lsl>