User Tools

Site Tools


Sidebar

Passage markup

basics

coding

extra

list

section

whitespace

Macros

basics

colour

data structure

date and time

game state

live

maths

number

revision

saving

showing and hiding

string

styling

url

deprecated

Types of data

Special keywords

Special passage tags

harlowe:str-reversed

(str-reversed: String) → String

Also known as: (string-reversed:)

A special shorthand combination of the (str:) and (reversed:) macros, this accepts a single string and reverses it.

Example usage:

  • (str-reversed: "sknahT") produces "Thanks"

Rationale:

This macro is a shorthand form of nesting (reversed:) inside (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 (reversed:) and (words:) macros like so: (reversed: ...(words: "Gilly Golly Milly Molly")).

See also:

harlowe/str-reversed.txt · Last modified: 2019/04/16 03:17 by l