endsWith: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(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...)
 
No edit summary
Line 1: Line 1:
==Function endsWith==
{{MacroFunction
|name=endsWith
|version=1.3b49
|description=Returns 1 if the string ends with a certain sub string.


 
|usage=
'''Introduced in MapTool 1.3b49'''
 
Returns 1 if the string ends with a certain sub string.
 
===Usage===
<source lang="mtmacro" line>
<source lang="mtmacro" line>
[h: result = endsWith(str, substr)]
[h: result = endsWith(str, substr)]
</source>
</source>


 
|examples=
===Examples===
<source lang="mtmacro" line>
<source lang="mtmacro" line>
[r: endsWith("Test", "t")]
[r: endsWith("Test", "t")]
Line 23: Line 20:
     1
     1
     0
     0
}}
[[Category:String Function]]

Revision as of 01:50, 7 March 2009

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