User Tools

Site Tools


fromw

# $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 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:

$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*"

History:

This function first appeared in “+2” (post-ircII, pre-EPIC)

fromw.txt · Last modified: 2007/03/02 02:32 (external edit)