Difference between revisions of "TrimList"
Jump to navigation
Jump to search
Ugleh Ulrik (talk | contribs) |
(Added desirable feature- compilablity...) |
||
Line 5: | Line 5: | ||
list TrimList(list dlist, integer length) | list TrimList(list dlist, integer length) | ||
{ | { | ||
integer | integer i; | ||
integer dl = llGetListLength(dlist); | |||
list temp = []; | list temp = []; | ||
while(~-- | while(~--dl) | ||
temp += llGetSubString(llList2String(dlist,i),0, length-1); | temp += llGetSubString(llList2String(dlist,i++),0, length-1); | ||
return temp; | return temp; | ||
} | } |
Revision as of 03:15, 2 September 2013
this function will trim a list of strings for the output of a dialog box.
Function <lsl> list TrimList(list dlist, integer length) {
integer i; integer dl = llGetListLength(dlist); list temp = []; while(~--dl) temp += llGetSubString(llList2String(dlist,i++),0, length-1); return temp;
}
</lsl>