This shows you the differences between two versions of the page.
— |
harlowe:append [2017/10/09 20:39] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | **(append: // ...[[harlowe:HookName|HookName]] or [[harlowe:String|String]]//) -> //[[harlowe:Changer|Changer]]//** | ||
+ | A variation of [[harlowe:replace|(replace:)]] which adds the attached hook's contents to | ||
+ | the end of each target, rather than replacing it entirely. | ||
+ | |||
+ | === Example usage: === | ||
+ | |||
+ | * ''%%(append: "Emily", "Em")[, my maid]%%'' adds ", my maid " to the end of every occurrence of "Emily" or "Em". | ||
+ | * ''%%(append: ?dress)[ from happier days]%%'' adds " from happier days" to the end of the ''%%|dress>%%'' hook. | ||
+ | |||
+ | === Rationale: === | ||
+ | |||
+ | As this is a variation of [[harlowe:replace|(replace:)]], the rationale for this macro can be found in | ||
+ | that macro's description. This provides the ability to append content to a target, building up | ||
+ | text or amending it with an extra sentence or word, changing or revealing a deeper meaning. | ||
+ | |||
+ | === See also: === | ||
+ | |||
+ | [[harlowe:replace|(replace:)]], [[harlowe:prepend|(prepend:)]] |