upper: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
No edit summary
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{MacroFunction
{{MacroFunction
|name=upper
|name=upper
|version=1.3b48
|description=
|description=
Returns the upper case version of a string. If the number of characters is not specified then the whole string is converted to upper case.
Returns the upper case version of a string. If the number of characters is not specified then the whole string is converted to upper case.


|usage=
|usage=
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
[h: str = upper(str)]
upper(str)
[h: str = uper(str, numChars)]
</syntaxhighlight>
</source>
<syntaxhighlight lang="mtmacro" line>
upper(str, numChars)
</syntaxhighlight>


|examples=
|examples=
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
[r: upper("this Is a Test")]
[r: upper("this Is a Test")]
[r: lower("this Is a Test", 1)]
[r: upper("this Is a Test", 1)]
</source>
</syntaxhighlight>
Returns  
Returns  
   THIS IS A TEST
   THIS IS A TEST

Latest revision as of 16:53, 14 March 2023

upper() Function

Introduced in version 1.3b48
Returns the upper case version of a string. If the number of characters is not specified then the whole string is converted to upper case.

Usage

upper(str)
upper(str, numChars)

Examples

[r: upper("this Is a Test")]
[r: upper("this Is a Test", 1)]

Returns

  THIS IS A TEST
This Is a Test