mirror of
https://github.com/zs-yg/kortapp-z.git
synced 2025-12-06 16:10:42 +08:00
26 lines
445 B
C++
26 lines
445 B
C++
#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
|