diff options
author | Alexis211 <alexis211@gmail.com> | 2009-09-19 15:36:08 +0200 |
---|---|---|
committer | Alexis211 <alexis211@gmail.com> | 2009-09-19 15:36:08 +0200 |
commit | e1680016d88eda4c20fdce9e27e7571a05740ee9 (patch) | |
tree | 4e0a0252fc8da54839e6f0315877e5767215b25d /Source/Kernel/Library/String.class.h | |
parent | f593816bc9c32a8570cf65697183f314348e8e87 (diff) | |
download | Melon-e1680016d88eda4c20fdce9e27e7571a05740ee9.tar.gz Melon-e1680016d88eda4c20fdce9e27e7571a05740ee9.zip |
Started conversion from String to BasicString<WChar>
Diffstat (limited to 'Source/Kernel/Library/String.class.h')
-rw-r--r-- | Source/Kernel/Library/String.class.h | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/Source/Kernel/Library/String.class.h b/Source/Kernel/Library/String.class.h index 6216415..ad1524d 100644 --- a/Source/Kernel/Library/String.class.h +++ b/Source/Kernel/Library/String.class.h @@ -3,14 +3,9 @@ #include <Core/common.wtf.h> #include <Library/WChar.class.h> +#include <Library/BasicString.class.h> -template <typename T> class Vector; - -class String { - private: - WChar *m_string; - u32int m_length; - +class String : public BasicString<WChar> { public: static String hex(u32int number); static String number(s32int number); @@ -18,23 +13,23 @@ class String { String(const char* string, u8int encoding = UE_UTF8); String(); String(const String &other); - ~String(); + virtual ~String(); - void affect(const String &other); + void affect(const String &other) { BasicString<WChar>::affect(other); } void affect(const char* string, u8int encoding = UE_UTF8); void operator= (const String &other) { affect(other); } void operator= (const char* other) { affect(other); } - bool compare(const String &other) const; + bool compare(const String &other) const { return BasicString<WChar>::compare(other); } bool compare(const char* string, u8int encoding = UE_UTF8) const; bool operator== (const String &other) const { return compare(other); } bool operator== (const char* other) const { return compare(other); } bool operator!= (const String &other) { return !compare(other); } bool operator!= (const char* other) { return !compare(other); } - String& append(const String &other); + String& append(const String &other) { BasicString<WChar>::append(other); return *this; } String& append(const char* other, u8int encoding = UE_UTF8); - String& append(WChar other); + String& append(WChar other) { BasicString<WChar>::append(other); return *this; } String &operator+= (const String &other) { return append(other); } String &operator+= (const char* other) { return append(other); } String &operator+= (WChar other) { return append(other); } @@ -57,7 +52,7 @@ class String { Vector<String> split(WChar c) const; - String substr(s32int start, s32int size); + String substr(s32int start, u32int size); }; #endif |