diff options
author | chai <chaifix@163.com> | 2019-01-19 01:44:05 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-01-19 01:44:05 +0800 |
commit | 91e589d1678a8187c307e09b98b67ec4133092ff (patch) | |
tree | ee2761f047568ca7164b27399c0b2fb2f21c26b0 /Source/Asura.Engine/Containers/String.h | |
parent | 91346d709abb37a063d0c29ddeb2d1a849d3afc2 (diff) |
*游戏框架改用脚本实现
Diffstat (limited to 'Source/Asura.Engine/Containers/String.h')
-rw-r--r-- | Source/Asura.Engine/Containers/String.h | 78 |
1 files changed, 78 insertions, 0 deletions
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 <string> + +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 |