#ifndef DEF_FWIK_STRING_H #define DEF_FWIK_STRING_H #include class String { private: char *ptr; // zero-terminated for internal purposes. int len; public: String(); String(const String& other); String(char* ptr); String(char* ptr, int len); String(char c, int count); ~String(); void operator=(const String &string); void operator=(char* ptr); char* c_str(); bool operator==(const String& other); bool operator==(char* other); bool operator<(const String& other); char &operator[](int pos); int size() { return len; } operator bool() { return len != 0; } String substr(int start, int count); String operator+(const String& other); void operator+=(const String& other); void operator+=(char c); static String dec(int i); static String hex(uint32_t v); }; #endif