-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMyString.h
31 lines (28 loc) · 1.04 KB
/
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
#pragma once
class MyString
{
protected:
int count;
char* string;
public:
MyString();
MyString(const MyString& tempString);
MyString (char* tempString, int tempCount); //конструктор создания строки (по умолчанию)
~MyString();
int GetCount();
void SetCount(int tempCount);
MyString CopyFromIndex (MyString tempString, int startIndex, int tempCount);
void FindString (const char* tempString);
int FindChar (char tempChar);
MyString& operator = (const MyString& tempString);
MyString operator + (MyString tempString);
bool operator == (MyString tempString);
bool operator != (MyString tempString);
bool operator < (MyString tempString);
bool operator > (MyString tempString);
bool operator <= (MyString tempString);
bool operator >= (MyString tempString);
friend std::ostream& operator << (std::ostream& out, const MyString& tempString);
friend std::istream& operator >> (std::istream& in, MyString& tempString);
char operator [] (int i);
};