Was this page helpful?

List.Splice

    Table of contents
    1. 1. Usage Restrictions
    2. 2. Parameters
    3. 3. Result
    4. 4. Samples
    list.Splice(list : list, start : num, length : num?, values : list?) : list 
    

    Remove the entries in a list and add from another list.

    Usage Restrictions

    1.9.1 or later

    Parameters

    Name Type Description
    list list The list value.
    start num start position.
    length num (optional, default: all) Number of elements to remove. If negative, relative to end of list
    values list (optional, default: none) values to insert (at the start position)

     

    Result

    a list with specified values removed from an index to a certain length limit. It also inserts values if that is specified in the values parameter.

    Samples


    Output

    to get a spliced list of values:

    {{ list.splice([1,2,4], 1, 2, [9,10]) }} 

     

    [ 1, 9, 10 ]
    Was this page helpful?
    Tag page
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by