trim

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

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


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