User Tools

Site Tools


findws

# $EPIC: findws.txt,v 1.2 2007/02/15 03:53:35 jnelson Exp $

Synopsis:

$findws(<word> <wordlist>)

Technical:

This function searches <wordlist> for <word> and returns all of the places it was found. If <word> isn't in <wordlist>, -1 is returned. You would use this instead of findw if <wordlist> had duplicates values.

Returns:

All <value>s where $word(value <wordlist>) == [<word>]

Examples:

$findw(very epic is a very very scriptable client)         /* returns 3 4 */

assign test blah hmm foo bar hmmm
fe ($findws(hmm $test)) x {
	echo $word($x $test)
}						/* Echos "hmm" twice. */
findws.txt · Last modified: 2007/02/15 03:53 (external edit)