User Tools

Site Tools


syntax:functions:mirror
no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


Previous revision
syntax:functions:mirror [2021/08/16 00:21] (current) craigt
Line 1: Line 1:
 +====== Mirror(text) ======
 +Category:  Text function
 +
 +\\ 
 +=====Description=====
 +This function returns a string with the reverse order of characters in //text//.
 +
 +\\ 
 +=====Use cases=====
 +This function allows for using text functions such as [[syntax:functions:keepbefore|KeepBefore]] and [[syntax:functions:keepafter|KeepAfter]] to operate with the //last// occurrence of a substring in a text value.  Refer to the example below.
 +
 +\\ 
 +=====Arguments=====
 +^Argument^Type^Description^
 +|text|Text|Any text value, or value that can be implicitly converted to text.|
 +
 +**Return value type:** Text
 +
 +\\ 
 +=====Remarks=====
 +Number values entered for //text// are implicitly converted to text.
 +
 +The case of characters is retained in the mirrored return value.
 +
 +\\ 
 +=====Examples=====
 +
 +  mirror('New Jersey') //Returns 'yesreJ weN'
 +
 +  mirror('Toronto') //Returns 'otnoroT'
 +
 +  mirror(123456) //Returns '654321' (Number implicitly converted; value returned as text.)
 +
 +\\ 
 +Allows the use of [[syntax:functions:keepafter|KeepAfter]] on the //last// instance of the specified character '-'. (Spaces added for clarity.)
 +
 +  mirror( keepafter( mirror('one-two-three'), '-') ) //Returns 'one-two'
  
syntax/functions/mirror.txt · Last modified: 2021/08/16 00:21 by craigt

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki