Copy a string: Difference between revisions

Content added Content deleted
(add RPL)
mNo edit summary
Line 2,616: Line 2,616:
<syntaxhighlight lang="vbnet">Dim a As String = "Test String"
<syntaxhighlight lang="vbnet">Dim a As String = "Test String"
Dim b As String = String.Copy(a) ' New string</syntaxhighlight>
Dim b As String = String.Copy(a) ' New string</syntaxhighlight>

=={{header|V (Vlang)}}==
Strings in Vlang are immutable. There is no need to distinguish between copying and making an additional reference.
<syntaxhighlight lang="Vlang">
text := "Hello"
copy_of := text
println(copy_of)
</syntaxhighlight>

{{out}}
<pre>
Hello
</pre>


=={{header|Wren}}==
=={{header|Wren}}==