substring: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 6: | Line 6: | ||
|usage= | |usage= | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
substring(str, start) | substring(str, start) | ||
</ | </syntaxhighlight> | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
substring(str, start, end) | substring(str, start, end) | ||
</ | </syntaxhighlight> | ||
|examples= | |examples= | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
[substring("This is a test", 5)] | [substring("This is a test", 5)] | ||
[substring("This is a test", 5, 7)] | [substring("This is a test", 5, 7)] | ||
</ | </syntaxhighlight> | ||
Returns | Returns | ||
<pre> | <pre> |
Revision as of 17:30, 14 March 2023
substring() Function
• Introduced in version 1.3b48
Returns the substring of the string from the start to the end indexes. Indexes for strings start at 0. If the end parameter is not specified then the substring extends to the end of the string.
Usage
substring(str, start)
substring(str, start, end)
Examples
[substring("This is a test", 5)]
[substring("This is a test", 5, 7)]
Returns
is a test is