| | |
| | | xstring& xstring::operator =(const xstring& rhs) |
| | | { |
| | | if (data)((KStringBlock<wchar_t>*)data)->Release(); |
| | | ((KStringBlock<wchar_t>*)rhs.data)->AddRef(); |
| | | data = rhs.data; |
| | | if (rhs.data) |
| | | { |
| | | ((KStringBlock<wchar_t>*)rhs.data)->AddRef(); |
| | | data = rhs.data; |
| | | } |
| | | else |
| | | data = nullptr; |
| | | return *this; |
| | | } |
| | | xstring& xstring::operator =(const wchar_t* rhs) |
| | |
| | | return false; |
| | | } |
| | | |
| | | xstring xstring::replace(wchar_t* from, wchar_t* to, int pos) |
| | | xstring xstring::replace(const wchar_t* from, const wchar_t* to) |
| | | { |
| | | return replace(from, to, 0); |
| | | } |
| | | xstring xstring::replace(const wchar_t* from, const wchar_t* to, int pos) |
| | | { |
| | | const wchar_t* pstr = c_str(); |
| | | if (!pstr) return 0; |