startsWith: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
No edit summary
m (Typographical tweak)
Line 8: Line 8:
</source>
</source>


Returns 1 (true) if the string starts with a certain substring and 0 (false) if not.
Returns {{true}} if the string starts with a certain substring and {{false}} if not.


|examples=
|examples=

Revision as of 18:14, 8 October 2012

startsWith() Function

Introduced in version 1.3b49

Usage

[h: result = startsWith(string, substring)]

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

Examples

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

Returns

   1
   1
0