Initial import of the ircii-pana-1.1-final source tree.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/tags/ircii-pana-1.1-final@1 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
31
bitchx-docs/6_Functions/word
Normal file
31
bitchx-docs/6_Functions/word
Normal file
@@ -0,0 +1,31 @@
|
||||
Synopsis:
|
||||
$word(<index> <list>)
|
||||
$notw(<index> <list>)
|
||||
|
||||
Technical:
|
||||
The $word() function returns the single word in the given list that has
|
||||
the given index in the list, counting from 0 (zero). Its counterpart,
|
||||
$notw(), does exactly the opposite, returning the entire string, minus
|
||||
the indexed word (again counting from 0).
|
||||
|
||||
Practical:
|
||||
These functions are useful when you need to get (or hide) whatever word
|
||||
is in a particular position in a string of words. It's mostly useful
|
||||
when you know that you always (or never) want the Xth word in the list,
|
||||
regardless of what it is.
|
||||
|
||||
Returns:
|
||||
word: indexed word
|
||||
notw: string without indexed word
|
||||
|
||||
Examples:
|
||||
$word(2 foo bar blah) returns "blah"
|
||||
$word(4 foo bar blah) returns nothing
|
||||
$word(-1 foo bar blah) returns nothing
|
||||
$notw(2 foo bar blah) returns "foo bar"
|
||||
$notw(4 foo bar blah) returns "foo bar blah"
|
||||
$notw(-1 foo bar blah) returns "foo bar blah"
|
||||
|
||||
See Also:
|
||||
leftw(6); restw(6); rightw(6)
|
||||
|
||||
Reference in New Issue
Block a user