added wxString::Clone() and made wxString(wxCStrData) ctor make deep copy too

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53327 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2008-04-24 07:16:48 +00:00
parent 951a1f6009
commit 06e9cf134f
2 changed files with 25 additions and 1 deletions

View File

@@ -261,6 +261,20 @@ public:
*/
void Clear();
/**
Returns a deep copy of the string.
That is, the returned string is guaranteed to not share data with this
string when using reference-counted wxString implementation.
This method is primarily useful for passing strings between threads
(because wxString is not thread-safe). Unlike creating a copy using
@c wxString(c_str()), Clone() handles embedded NULs correctly.
@since 2.9.0
*/
wxString Clone() const;
//@{
/**
Case-sensitive comparison.