User Tools

Site Tools


afterw

Synopsis:

$afterw(<word> <word list>)

Defined behaviors:

  • afterw() == []
  • afterw(word) == []
  • afterw(word some list) == []
  • afterw(word a word list) == [list]
  • afterw(WORD a WoRd list) == [list]
  • For any $x: afterw(word $x) == restw(findw(word $x) $x)
  • The same as findw(), afterw() honors /xdebug dword
  • The same as findw(), all string comparisons are case insensitive
  • The same as findw(), afterw() honors your locale's collation rules

Practical:

  • This function returns the part of a word list that occurs after a given word.
  • If the given word is not in the word list, the empty string will be returned
  • If there are not enough parameters, the empty string will be returned

Examples:

$afterw(foobar one two foobar my shoe)    returns "my shoe"
$afterw(booya one two foobar my shoe)     returns ""  (empty string)

History:

This function first appeared in “plus 2” (post-ircII, pre-EPIC) Long ago, this function used to do wildcard matching instead of literal string compares.

afterw.txt · Last modified: 2016/07/19 19:47 by sgrubnick