startsWith

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

Function startsWith

Introduced in MapTool 1.3b49

Returns 1 if the string starts with a certain sub string.

Usage

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


Examples

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

Returns

   1
   1
   0