endsWith

From RPTools Wiki
Revision as of 09:07, 24 December 2008 by Craig (talk | contribs) (New page: ==Function endsWith== '''Introduced in MapTool 1.3b49''' Returns 1 if the string ends with a certain sub string. ===Usage=== <source lang="mtmacro" line> [h: result = endsWith(str, sub...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Function endsWith

Introduced in MapTool 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