This shows you the differences between two versions of the page.
— |
harlowe:prepend [2017/10/09 20:39] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | **(prepend: // ...[[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 beginning of each target, rather than replacing it entirely. | ||
+ | |||
+ | === Example usage: === | ||
+ | |||
+ | * ''%%(prepend: "Emily", "Em")[Miss ]%%'' adds "Miss " to the start of every occurrence of "Emily" or "Em". | ||
+ | * ''%%(prepend: ?dress)[my wedding ]%%'' adds "my wedding " to the start 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 prepend content to a target, adding | ||
+ | preceding sentences or words to a text to change or reveal a deeper meaning. | ||
+ | |||
+ | === See also: === | ||
+ | |||
+ | [[harlowe:replace|(replace:)]], [[harlowe:append|(append:)]] |