12345678910111213141516171819202122232425262728 |
- #ifndef STRING_H
- #define STRING_H
- #include "utils/Types.h"
- class String final {
- public:
- String();
- String(const char* str);
-
- bool operator==(const String& other) const;
- bool operator!=(const String& other) const;
- operator const char*() const;
- char operator[](uint index) const;
- uint getLength() const;
-
- String& append(char c);
- String& append(const char* str);
- String& append(int i);
- String& append(float f);
- private:
- static constexpr uint MAX_LENGTH = 255;
- char data[MAX_LENGTH];
- u8 length;
- };
- #endif
|