Copy constructor |
![]() |
|
|
Initialize the new instance to contain a copy of the passed string.
Due to the technique of instance sharing, this is a very fast operation (it does not require the actual string data to be copied and a new buffer to be allocated). The only exception is when a string is moved from thread to thread; in that case, the actual character bytes will be copied to avoid concurrency issues with the shared buffer.
See also: Constructors & utility