index

func index(sl, li : List+String) -> Integer
  return first([all i in domain(li) | sl = slice(li, [i..i+#sl-1])}

Returns the index position of the first sub list or sub string of li that matches sl. For example:

  index(`ring' `string') = 3
  index([1 2] [1 2 3]) = 1
  index(1 [2 3]) = Undefined
  index(`z' `abc') = Undefined
See also: indexed, split.
Herman Venter

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