Copy a string: Difference between revisions
Content deleted Content added
m Spelling/grammar/aesthetics and removed an extra category tag |
|||
Line 1:
{{task}}
This task is about copying a string.
=={{header|Ada}}==
Line 104:
=={{header|C sharp|C #}}==
string src = "Hello";
string dst = src;
Line 125 ⟶ 124:
=={{header|Factor}}==
Factor strings are mutable but not growable.
"This is a mutable string." dup ! reference
Line 140 ⟶ 139:
SBUF" I'll be a string someday." >string .
"I'll be a string
=={{header|Forth}}==
Forth strings are generally stored in memory as prefix counted string, where the first byte contains the string length. However, on the stack they are most often represented as <addr cnt> pairs.
\ Allocate two string buffers
Line 191 ⟶ 190:
=={{header|Pop11}}==
In Pop11 normal data are represented by references, so plain assignment will copy references. To copy data one has to use copy procedure:
vars src, dst;
|