mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
More function documentation
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@568 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
Function: substring
|
||||
|
||||
--Usage--
|
||||
> substring(some_string, begin: number, end: number)
|
||||
|
||||
Extract a subsection of a string.
|
||||
|
||||
--Parameters--
|
||||
| @input@ [[type:string]] String to extract something from.
|
||||
| @begin@ [[type:int]] (optional) Index of first character to keep (the first index is 0).
|
||||
If ommitted, starts at the begining of the string.
|
||||
| @end@ [[type:int]] (optional) Index just beyond the last character to keep.
|
||||
If ommitted, runs to the end of the string.
|
||||
|
||||
--Examples--
|
||||
> substring("abcdefg", end:2) == "ab"
|
||||
> substring("abcdefg", begin:2) == "cdefg"
|
||||
> substring("abcdefg", begin:2, end:4) == "cd"
|
||||
> substring("abcdefg", begin:2, end:2) == ""
|
||||
Reference in New Issue
Block a user