Difference between revisions of "ListStridedRemove"

From Second Life Wiki
Jump to navigation Jump to search
m (added LSL function detail)
m
Line 1: Line 1:
{{LSL_Function
|mode=user
|func=ListStridedRemove
|p1_type=list|p1_name=src
|p2_type=integer|p2_name=start
|p3_type=integer|p3_name=end
|p4_type=integer|p4_name=stride
|return_type=list
|return_text=that contains the elements of '''myList''' but with the strides in the range of '''start''' to '''end''' removed.
|func_desc=Removes a specified part of a strided list.
|func_footnote=
<lsl>
list ListStridedRemove(list src, integer start, integer end, integer stride) {
    return llDeleteSubList(src, start * stride, (stride * (end + 1)) - 1);
}</lsl>
{{LSL_Function
{{LSL_Function
|mode=user
|mode=user

Revision as of 07:23, 16 December 2009

Summary

Function: list ListStridedRemove( list src, integer start, integer end, integer stride );

Removes each stride from a list, example a list of 1,2,3,A,1,2,3,A after ListStridedRemove(list,4,0,4); would be 1,2,3,1,2,3
Returns a list

• list src
• integer start
• integer end
• integer stride

created fixed and improved by Madpeter Zond <lsl> list ListStridedRemove(list src, integer start, integer end, integer stride) {

   if((start < 1)

Examples

<lsl>list customers = ListStridedRemove(customers, 0, 0, STRIDELENGTH);</lsl>