Files
twanvl 689def7325 Yet more function documentation
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@571 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-07-14 00:29:25 +00:00

21 lines
729 B
Plaintext

Function: substring
--Usage--
> substring(some_string, begin: number, end: number)
Extract a subsection of a string.
--Parameters--
! Parameter Type Description
| @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) == ""