Add files via upload

This commit is contained in:
zsyg
2025-06-30 15:46:31 +08:00
committed by GitHub
parent e387d22fee
commit 1dbd9968c9
8 changed files with 290 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
#ifndef STRING_HPP
#define STRING_HPP
#include <cstddef>
class String {
public:
String();
String(const char* str);
String(const String& other);
~String();
size_t length() const;
const char* c_str() const;
String& operator=(const String& other);
String operator+(const String& other) const;
bool operator==(const String& other) const;
private:
char* data;
size_t len;
};
#endif // STRING_HPP