Copy a string: Difference between revisions

Content added Content deleted
(→‎sed: add)
Line 2,334: Line 2,334:
<syntaxhighlight lang="scheme">(define dst (string-copy src))</syntaxhighlight>
<syntaxhighlight lang="scheme">(define dst (string-copy src))</syntaxhighlight>


=={{header|Seed7}}==
=={{header|sed}}==
In ''sed'', there are two distinct locations for storing a string: The "pattern space" and the "hold space". The <code>h</code> command copies pattern space to hold space. The <code>g</code> command copies hold space to pattern space.


=={{header|Seed7}}==
<syntaxhighlight lang="seed7">var string: dest is "";
<syntaxhighlight lang="seed7">var string: dest is "";