all_but_last

func all_but_last(sl : String+List) -> String+List
  return trim_right(sl, 1)

Returns a string or list consisting of all but the last of the elements of the given string or list. For example:
  all_but_last([1 2 3]) = [1 2]
  all_but_last(`23') = `2'
  all_but_last([1]) = []
  all_but_last([]) = Undefined
See also: first, hd, last, slice, tl, rest, take_left, take_right, trim, trim_left, trim_right.
Herman Venter

This is Slim documentation as snarfed on 27 May 1999 by dB.