Website Summary Files Commits Branches @commit @diff @stats
path: root / Week05 / Exercise03 / String.h
blob: 3b0aa1ddbf0bcec8016a230d283e255553c89b43 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#ifndef _STRING
#define _STRING

class String {
	char* str;
	unsigned length;

	void free();
	void copyFrom(const String& other);

public:
	String();
	~String();
	String(const String& other);
	String& operator=(const String& other);

	String(String&& other);
	String& operator=(String&& other);

	String(const char* str);

	bool IsTheSameAs(const String& other) const;
	const char* GetStr() const;
};

#endif /* _STRING */