A
/ \ _ Play Now Nemesis on
| | | | _______ _ _ _______ _______ _ _______
| |\ | | | ____| | \ / | | ____| / ____| | | / ____|
/-------/-------------------------------------------------------------------,
O= Home <=XX| About News Pics Adventurers Wizards Download Connect >
\-------\-------------------------------------------------------------------'
| | \ | | |____ | | | | | |____ ___ \ \ | | ___ \ \
| | \_| |_______| |_| |_| |_______| |_______/ |_| |_______/
\ /
V
Documentation Area
Document Path: /doc/efun/extract
Name: extract - extract a substring from a string
Syntax:
string extract(string str, int from);
string extract(string str, int from, int to)
Description:
The extract efun gets a substring from a string. Character 0 is first
character, charater (strlen(str)-1) is the last.
If the third argument is omitted, eg. extract(str, n), it will return
a substring from characer number 'n' to the end.
If all arguments are given, eg. ectract(str, i, j), it will return a
string from character i to character j.
Note:
The function is equivalent to the LPC syntax
str[from..to]
Therefore you SHOULD NOT use extract any more!
Examples:
extract("random", 3) will return "dom".
extract("random", 1, 3) will return "and".
See also:
This page was generated in LPC
Imprint / Impressum