-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmyString.h
39 lines (26 loc) · 801 Bytes
/
myString.h
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
27
28
29
30
31
32
33
34
35
36
37
38
39
#pragma once
#include <iostream>
#include <ctype.h>
class MyString
{
char* m_pStr;
public:
MyString();
const char* GetString() const;
explicit MyString(const char* str);
MyString(const MyString& other);
MyString(MyString&&);
void SetNewString(const char*);
void SetNewString(MyString&);
MyString& operator=(const MyString& str);
MyString& operator=(const char* str);
MyString& operator=(MyString&& str);
friend std::ostream& operator<< (std::ostream& out, const MyString& str);
MyString operator+(const MyString& str);
MyString& operator+= (const MyString& str);
MyString operator--(int);
MyString& operator++();
~MyString();
operator char* () { return m_pStr; }
};
MyString ConcatenString(const char*,...);