Difference between revisions of "TrimList"
Jump to navigation
Jump to search
Ugleh Ulrik (talk | contribs) (Created page with "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; list temp = []; …") |
m (<lsl> tag to <source>) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 2: | Line 2: | ||
'''Function''' | '''Function''' | ||
< | <source lang="lsl2"> | ||
list TrimList(list dlist, integer length) | list TrimList(list dlist, integer length) | ||
{ | { | ||
integer i; | integer i; | ||
integer dl = llGetListLength(dlist); | |||
list temp = []; | list temp = []; | ||
while(~--dl) | |||
temp += llGetSubString(llList2String(dlist,i++),0, length-1); | |||
return temp; | return temp; | ||
} | } | ||
</ | </source> | ||
{{LSLC|User-Defined Functions}} | {{LSLC|User-Defined Functions}} |
Latest revision as of 14:44, 22 January 2015
this function will trim a list of strings for the output of a dialog box.
Function
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;
}