String.h 472 B

1234567891011121314151617181920212223
  1. #ifndef STRING_H
  2. #define STRING_H
  3. #include <cstddef>
  4. class String final {
  5. public:
  6. String();
  7. String(const char* str);
  8. String& operator+=(const char* str);
  9. String& operator+=(char c);
  10. String& operator+=(unsigned int i);
  11. String& operator+=(double d);
  12. String operator+(const char* str) const;
  13. operator const char*() const;
  14. private:
  15. static constexpr size_t capacity = 4096;
  16. size_t usedCapacity;
  17. char path[capacity];
  18. };
  19. #endif