User Tools

Site Tools


syntax:functions:mirror

Differences

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

Link to this comparison view

syntax:functions:mirror [2016/07/09 09:51] – created dmitrysyntax:functions:mirror [2021/08/16 00:21] (current) craigt
Line 1: Line 1:
-===== Mirror(text) =====+====== Mirror(text) =====
 +Category:  Text function
  
-Reverse the order of characters in //text//.+\\  
 +=====Description===== 
 +This function returns a string with the reverse order of characters in //text//.
  
-^  Example  ^  Result  ^ +\\  
-mirror('Les Misérables')  selbarésiM seL  |+=====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.
  
-This function allows using text functions such as [[syntax:functions:keepbefore]] or [[syntax:functions:keepafter]] to operate with the last occurrence of a substring in a text. See 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'
  
-^  Example  ^  Result  ^ 
-| mirror(keepafter(mirror('one-two-three'), '-'))  | one-two  | 
syntax/functions/mirror.1468072279.txt.gz · Last modified: 2016/07/09 09:51 by dmitry

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki