substring

From RPTools Wiki
Revision as of 10:20, 14 December 2008 by Craig (talk | contribs) (New page: ==Function substring== Returns the substring of the string from the start to the end indexes. Indexes for strings start at 0. If the end parameter is not specified then the substring exte...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Function substring

Returns the substring of the string from the start to the end indexes. Indexes for strings start at 0. If the end parameter is not specified then the substring extends to the end of the string.

Usage

[h: str = substring(str,  start)]
[h: str = substring(str,  start, end)]


Example

    [substring("This is a test", 5)]
    [substring("This is a test", 5, 7)]

Returns

   is a test
   is