startsWith

From RPTools Wiki
Revision as of 10:40, 5 July 2012 by Wolph42 (talk | contribs)
Jump to navigation Jump to search

startsWith() Function

Introduced in version 1.3b49

Usage

[h: result = startsWith(str, substr)]

Returns 1 (true) if the string (str) starts with a certain sub string (substr) and 0 (false) if not.

Examples

[r: startsWith("Test", "T")]
[r: startsWith("Test", "Te")]
[r: startsWith("Test", "Tez")]

Returns

   1
   1
0