#pragma once #include class WCString { public: WCString(void); WCString(const char *rhs); WCString(const wchar_t *rhs); WCString(const std::string &rhs); WCString(const WCString &rhs); ~WCString(void); std::string to_string(); const wchar_t *w_str() const; const char *c_str() const; unsigned int length() const { return data.length(); } void clear() { data.clear(); } WCString &operator=(const WCString &rhs); WCString &operator=(const std::string &rhs); WCString &operator=(const wchar_t *rhs); WCString &operator=(const char *rhs); WCString &operator+=(const WCString &rhs); WCString &operator+=(const std::string &rhs); WCString &operator+=(const wchar_t *rhs); WCString &operator+=(const char *rhs); WCString operator+(const WCString &rhs); WCString operator+(const std::string &rhs); WCString operator+(const wchar_t *rhs); WCString operator+(const char *rhs); protected: std::basic_string data; mutable char *char_copy; };