startsWith: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(Fixed examples to use "startsWith" instead of "endsWith")
Line 12: Line 12:
|examples=
|examples=
<source lang="mtmacro" line>
<source lang="mtmacro" line>
[r: endsWith("Test", "T")]
[r: startsWith("Test", "T")]
[r: endsWith("Test", "Te")]
[r: startsWith("Test", "Te")]
[r: endsWith("Test", "Tez")]
[r: startsWith("Test", "Tez")]
</source>
</source>



Revision as of 01:47, 23 March 2009

startsWith() Function

Introduced in version 1.3b49

Usage

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

Examples

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

Returns

   1
   1
0