Skip to content

duplicate en

Hamatoma edited this page Aug 6, 2022 · 1 revision

"Multiplying" a text, whereby consecutive numbers, consecutive character strings or specified individual values ​​can be contained with placeholders.

These placeholders are inserted in the template text and replaced with concrete values ​​when duplicating.

Parameters

Name Type Description Example
append bool The result is appended in the destination buffer. append
baseChar character Base for running string. baseChar=a
BaseChars string Bases for running string when using multiple running elements. BaseChars="aA"
count nat How many times the text is copied. count=3
input bufferName The text from this buffer is duplicated. Default: input input=data
ListValues listOfStringList a list of text lists if multiple continuous elements are used. Nested auto separators: One to separate the "areas", in the example ";", one for each area to separate the values, in the example "," and "/". ListValues=";,"adam","berta","charly";"/male/female/diverse";,"41","23","59"
meta character Delimiter for the placeholders inside input. Default: % meta=%
offset nat Base for running elements. Default: 0 offset=100
Offsets natList A list of offsets when using multiple contiguous items. Offsets=10,1,100
output bufferName the result is written to this buffer. Default: output output=result
step nat Distance between two continuous elements. step=2
Step natList A list of step specifications when multiple continuous elements are used. Steps=2,1,10
Values stringList A list of texts to be inserted consecutively. auto separator. Can also be interpolated text. Values=",bob,eva"
Values=i%",%tone%n,%ttwo%n,%tthree%n"
  • The BaseChars, ListValues, Offsets and Steps parameters, if used, must each have the same number of elements.

Wildcard

Note: the delimiters of the placeholders can be freely selected (parameter meta), % is used in the example.

  • %index: a consecutive number, starting with 0.
  • %number: a consecutive number, starting with parameter offset and distance step.
  • %char%: a running character, starting with baseChar.
  • %value%: an item from the list of Values.
If several continuous elements are required, the following will help:
  • %number0%: sequential number, starting with the first element of Offsets and offsetting the first element of Steps.
  • %number1%: consecutive number, starting with the second element of Offsets and offsetting the second element of Steps.
and so forth
  • %char0%: a consecutive character, starting with the first element of BaseChars.
  • %char1%: a continuous character, starting with the second element of BaseChars.
and so forth

Examples

The input buffer contains:

no: %index% id: %number% place: %char%
The output buffer contains:
= list:
Command:
duplicate count=2 offset=100 step=10 baseChar=Q append
After that, the buffer shows output:
= list:
no: 0 id: 100 place: Q
no: 1 id: 110 place: R

The input buffer contains:

no: !index! id: !number0! place !char0! key: !char1!!char1!!char1!
Command:
duplicate count=3 Offsets=10.0 Steps=5.1 BaseChar="Ak" meta=! out=list
Then in the buffer "list":
no: 0 id: 10 place A key: kkk
no: 1 id: 15 place B key: lll
no: 2 id: 20 place C key: mmm

The "input" buffer contains:

animal %number%: %value%
Command:
duplicate count=2 offset=1 Values=",cat,dog"

Then in the buffer "output":

animal 1: cat
animal 2: dog

The "input" buffer contains:

animal %value0% named %value1% comes from %value2%.
Command:
duplicate count=2 ListValues=";,cat,dog;,Mia,Harro;,London,Rome"

Note: the list of lists uses the separator ";", the text lists the separator ",".

After that the buffer "output" contains:

animal cat named Mia comes from London.
animal dog named Harro comes from Rome.

Clone this wiki locally