# $EPIC: index.txt,v 1.2 2007/03/02 02:32:04 jnelson Exp $
$index(<characters> <text>)
It used to be common to use $index() to find a character in a string so that you could extract the parts of the string before and after the character. This is more easily done by $before() and $after() though.
-1 no character in <characters> was found in <text> > -1 index to first instance of something in <characters> in <text>
This function originally appeared in ircII.
$index(abc hello there bob) returns 12 $index(abc hello there bob) returns 14 (because of the spaces after 'c' and before 'h') $index(xyz hello there bob) returns -1 $index() returns the empty string