startsWith: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(Fixed examples to use "startsWith" instead of "endsWith")
No edit summary
Line 2: Line 2:
|name=startsWith
|name=startsWith
|version=1.3b49
|version=1.3b49
|description
Returns 1 if the string starts with a certain sub string.


|usage=
|usage=
Line 9: Line 7:
[h: result = startsWith(str, substr)]
[h: result = startsWith(str, substr)]
</source>
</source>
Returns 1 (true) if the string (str) starts with a certain sub string (substr) and 0 (false) if not.


|examples=
|examples=

Revision as of 10:40, 5 July 2012

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