startsWith: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
m (Typographical tweak)
mNo edit summary
Line 2: Line 2:
|name=startsWith
|name=startsWith
|version=1.3b49
|version=1.3b49
|description=
Returns {{true}} if the first parameter starts with the contents of the second parameter.


|usage=
|usage=

Revision as of 03:53, 1 March 2019

startsWith() Function

Introduced in version 1.3b49
Returns true(1) if the first parameter starts with the contents of the second parameter.

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