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:
28
bitchx-docs/6_Functions/left
Normal file
28
bitchx-docs/6_Functions/left
Normal file
@@ -0,0 +1,28 @@
|
||||
Synopsis:
|
||||
$left(<count> <text>)
|
||||
$right(<count> <text>)
|
||||
|
||||
Technical:
|
||||
These functions return a slice of the given length from the input
|
||||
string, either from the left side or the right side of the string. The
|
||||
functions do no padding, so it is more accurate to say that they will
|
||||
return no more than the given number of characters, not necessarily
|
||||
exactly the given amount.
|
||||
|
||||
Practical:
|
||||
The most common use for these functions is fetching a certain number of
|
||||
characters from an arbitrary string, where the length is known, but the
|
||||
contents are inconsequential.
|
||||
|
||||
Returns:
|
||||
substring no longer than specified length
|
||||
|
||||
Examples:
|
||||
$left(5 biklmnopstv) returns "biklm"
|
||||
$left(15 biklmnopstv) returns "biklmnopstv"
|
||||
$left(-2 biklmnopstv) returns nothing
|
||||
$right(5 biklmnopstv) returns "opstv"
|
||||
|
||||
See Also:
|
||||
mid(6)
|
||||
|
||||
Reference in New Issue
Block a user