This shows you the differences between two versions of the page.
fromw [2007/03/02 02:32] |
fromw [2007/03/02 02:32] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | # $EPIC: fromw.txt,v 1.3 2007/03/02 02:32:04 jnelson Exp $ | ||
+ | ======Synopsis:====== | ||
+ | $__fromw__(<word> <word list>) | ||
+ | |||
+ | ======Technical:====== | ||
+ | * If the <word> argument is omitted this function returns the empty string. | ||
+ | * The <word list> is literal strings. Before EPIC4-1.1.10, the <word list> was a list of wildcard patterns. | ||
+ | * If <word> is not found in <word list>, this function returns the empty string. | ||
+ | * Otherwise, the function behaves "as if" the following had been performed: \\ <val> = findw(<word> <word list>) \\ <function_return> = restw(<val> <word list>) | ||
+ | * Remember that <wordlist> is a list of [[what is a word|words]]. | ||
+ | |||
+ | ======Practical:====== | ||
+ | This function lets you get the part of <word list> that occurs AFTER | ||
+ | AND INCLUDING the <word>. | ||
+ | |||
+ | ======Returns:====== | ||
+ | The portion of <word list> after and including the <word>. | ||
+ | |||
+ | ======Examples:====== | ||
+ | <file> | ||
+ | $fromw(foobar one two foobar my shoe) returns "foobar my shoe" | ||
+ | $fromw(booya one two foobar my shoe) returns "" (empty string) | ||
+ | $fromw(foobar f* fo* foobar foo* foob*) returns "foobar foo* foob*" | ||
+ | </file> | ||
+ | |||
+ | ======History:====== | ||
+ | This function first appeared in "+2" (post-ircII, pre-EPIC) | ||