Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUST

armanriazi•rust•copy•clone•deeply•shallow

{
concept of copying the pointer, length, and capacity without copying the data probably sounds like making a shallow copy
}
{
If we do want to deeply copy the heap data of the String, not just the stack data, we can use a common method called clone
}
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
6+7 =