trim_right

func trim_right(ls : List+String, n : Integer) -> List+String
  n := 1 when n = Undefined
  return slice(ls, [1..#ls-n])

Trims away the front of a string or list. For example:
  trim_right(`"abc"') = `"abc'
  trim_right(`"abc"', 2) = `"ab'
See also: trim, trim_left.
Herman Venter


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