TRIM-LAST

REBOL Dictionary 2.0


Summary:

(missing)

Usage:

trim-last series

Arguments:

series - The series argument.

Description:

This is a helper function for the common case where you want to remove the last value of a series.


    data: [1 2 3 4 5]
    trim-last data
    probe data
    [1 2 3 4 5]


    str: "abcde"
    trim-last str
    probe str
    "abcde"

Related:

clear - Removes all values from the current index to the tail. Returns at tail.
remove - Removes value(s) from a series and returns after the remove.
trim - Removes whitespace from a string. Default removes from head and tail.

User Comments:

-From: giesse_writeme.com 8-Dec-2000/7:10:29-8:00:

Creates a copy of the series except for the last element.


    >> trim-last [1 2 3 4]
    == [1 2 3]


<Back | Index | Next>

Copyright 2003 REBOL Technologies