From 91e589d1678a8187c307e09b98b67ec4133092ff Mon Sep 17 00:00:00 2001 From: chai Date: Sat, 19 Jan 2019 01:44:05 +0800 Subject: =?UTF-8?q?*=E6=B8=B8=E6=88=8F=E6=A1=86=E6=9E=B6=E6=94=B9=E7=94=A8?= =?UTF-8?q?=E8=84=9A=E6=9C=AC=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/Asura.Engine/Containers/String.h | 78 +++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 Source/Asura.Engine/Containers/String.h (limited to 'Source/Asura.Engine/Containers/String.h') diff --git a/Source/Asura.Engine/Containers/String.h b/Source/Asura.Engine/Containers/String.h new file mode 100644 index 0000000..3c806fb --- /dev/null +++ b/Source/Asura.Engine/Containers/String.h @@ -0,0 +1,78 @@ +#ifndef __AE_STRING_H__ +#define __AE_STRING_H__ + +#include + +namespace AsuraEngine +{ + namespace Containers + { + + /// + /// ·ā×°std::string + /// + class String : public std::string + { + public: + inline String() + : std::string() + { + } + + inline String(const std::string& str) + : std::string(str) + { + } + + inline String(const String& str) + : std::string(str) + { + } + + inline String(const char* str) + : std::string(str) + { + } + + inline String& operator = (const String& str) + { + std::string::operator=(str); + return *this; + } + + inline operator const char* () const + { + return this->c_str(); + } + + inline const char* str() const + { + return this->c_str(); + } + + inline String(const String& s2, size_type pos2, size_type len2) + : std::string(s2, pos2, len2) + { + } + + inline String(const char* buf, size_type bufsize) + : std::string(buf, bufsize) + { + } + + inline String(size_type repetitions, char c) + : std::string(repetitions, c) + { + } + + inline int length() const + { + return size(); + } + + }; + + } +} + +#endif \ No newline at end of file -- cgit v1.1-26-g67d0