User Tools

Site Tools


harlowe:str-reversed

Differences

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

Link to this comparison view

harlowe:str-reversed [2019/04/16 03:17] (current)
l created
Line 1: Line 1:
 +**(str-reversed:​ //​[[harlowe:​string|String]]//​) → //​String//​**
  
 +Also known as: [[harlowe:​string-reversed|(string-reversed:​)]]
 +
 +A special shorthand combination of the [[harlowe:​str|(str:​)]] and [[harlowe:​reversed|(reversed:​)]] macros, this accepts a single [[harlowe:​string|string]] and reverses it.
 +
 +=== Example usage: ===
 +
 +  * ''​%%(str-reversed:​ "​sknahT"​)%%''​ produces ''​%%"​Thanks"​%%''​
 +
 +=== Rationale: ===
 +
 +This macro is a shorthand form of nesting [[harlowe:​reversed|(reversed:​)]] inside [[harlowe:​str|(str:​)]]. This example: ''​%%(str:​ ...(reversed:​ "​ABRAXAS"​))%%''​ is the same as ''​%%(str-reversed:​ "​ABRAXAS"​)%%''​.
 +
 +=== Details: ===
 +
 +This accepts strings of 0 or 1 character, as well as symmetrical strings, even though their "​reversal"​ is the same as their current form.
 +
 +If you wish to reverse just the words in a string, you can use the ordinary [[harlowe:​reversed|(reversed:​)]] and [[harlowe:​words|(words:​)]] macros like so: ''​%%(reversed:​ ...(words: "Gilly Golly Milly Molly"​))%%''​.
 +
 +=== See also: ===
 +
 +[[harlowe:​reversed|(reversed:​)]]
harlowe/str-reversed.txt · Last modified: 2019/04/16 03:17 by l