TU-Berlin → Inst. f. Mathematik → Algebra und Zahlentheorie → KASH → Documentation → Reference Manual
KASH3 Reference Manual
search    

Function

Position ( string S, char c ) -> elt-ord^rat

Optional Arguments

Startelt-ord^rat (Default: 1) Determines the position where the search is started.
FailanyDetermines what to return in case of failure.

Description

Return the position of the first occurence of `c' in `S' if c is a character in the string `S', and FAILURE otherwise.

Examples

S:="foobar"; Position(S,'o'); Position(S,'f',rec(Start:=2)); Position(S,"foo");
Built: Mon Nov 14 21:12:39 UTC 2005 on mack
The KANT Group