Assignment operators |
![]() |
|
|
|
|
|
Copy the value of source into the string object, replacing any previous data there.
Copying one Str object to another is a very fast operation (see instance sharing); copying a C string involves that the actual data bytes be copied. The exception is when using the library in a thread-safe environment and copying a Str instance created on one thread into another; this will cause full copy (no reference counting is involved). This further reduces the potential of difficult-to-find bugs in multithreaded programs writing to strings on different threads.
If using the STRACHAR version in a Unicode build, a conversion will automatically occur at runtime. To prevent this, use the STRWCHAR assignment instead. The compiler will automatically choose the proper overload depending on your source string datatype.
|
|
||
|
|
Copy the value of source into the string object, replacing any previous data there. If using the STRWCHAR version in an ANSI build, a conversion will automatically occur at runtime.
See also: Constructors & utility