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:
29
bitchx-docs/6_Functions/afterw
Normal file
29
bitchx-docs/6_Functions/afterw
Normal file
@@ -0,0 +1,29 @@
|
||||
Synopsis:
|
||||
$afterw(<word> <text>)
|
||||
$beforew(<word> <text>)
|
||||
|
||||
Technical:
|
||||
These functions return their input string, minus all words up to the
|
||||
given word ($beforew()) or following the given word ($afterw()). They
|
||||
are analogous to $after() and $before(), operating on whole words
|
||||
instead of characters. They search only for the first occurrence of the
|
||||
given word.
|
||||
|
||||
Practical:
|
||||
These return the part of the input text that is before or after the
|
||||
first instance of the given word. This is probably most useful for
|
||||
internal parsing inside scripts; a variable might hold certain
|
||||
parameters, of which only certain ones might be useful at a particular
|
||||
time. If the given word does not appear in the input text, nothing
|
||||
is returned.
|
||||
|
||||
Returns:
|
||||
afterw: input list after first instance of given word
|
||||
beforew: input list before first instance of given word
|
||||
|
||||
Examples:
|
||||
$afterw(foobar one two foobar my shoe) returns "my shoe"
|
||||
$afterw(booya one two foobar my shoe) returns "" (empty string)
|
||||
$beforew(foobar one two foobar my shoe) returns "one two"
|
||||
$beforew(booya one two foobar my shoe) returns "" (empty string)
|
||||
|
||||
Reference in New Issue
Block a user