diff options
author | chai <chaifix@163.com> | 2018-12-18 00:20:34 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-12-18 00:20:34 +0800 |
commit | f3d4611f137ed574ae705eec61c0ce80da8af806 (patch) | |
tree | 30608aaaecca5d9bf7bd08792bd27c022d6e987b /src | |
parent | 7d46b9b21e6608968e95d9d19db5bb9442588187 (diff) |
*string
Diffstat (limited to 'src')
-rw-r--r-- | src/libjin/common/je_string.h | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/src/libjin/common/je_string.h b/src/libjin/common/je_string.h new file mode 100644 index 0000000..db0cffb --- /dev/null +++ b/src/libjin/common/je_string.h @@ -0,0 +1,67 @@ +#ifndef __JE_STRING_H__ +#define __JE_STRING_H__ + +#include <string> + +namespace JinEngine +{ + + 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& 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* nts) + : std::string(nts) + { + } + + inline String(const char* buf, size_type bufsize) + : std::string(buf, bufsize) + { + } + + inline String(size_type repetitions, char c) + : std::string(repetitions, c) + { + } + + }; + +} + +#endif
\ No newline at end of file |