endsWith

From RPTools Wiki
Revision as of 18:27, 14 March 2023 by Taustin (talk | contribs) (Text replacement - "<source" to "<syntaxhighlight")
Jump to navigation Jump to search

endsWith() Function

Introduced in version 1.3b49
Returns 1 if the string ends with a certain sub string.

Usage

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

Examples

[r: endsWith("Test", "t")]
[r: endsWith("Test", "st")]
[r: endsWith("Test", "z")]

Returns

   1
   1
0