-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathString.h
More file actions
57 lines (42 loc) · 1.2 KB
/
String.h
File metadata and controls
57 lines (42 loc) · 1.2 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#pragma once
#include <iostream>
using namespace std;
class String
{
private:
char* value_;
int length_;
int cmp(const String& string);
int cmp(const char *string);
public:
String();
String(const char* value);
String(int length, char symbol);
String(const String& string);
~String();
String& operator=(const String& string);
friend String operator+(const String& string, const String& string2);
friend String operator*(String& str, int N);
bool operator==(const String& string);
bool operator==(const char *string);
bool operator<=(const String& string);
bool operator<=(const char *string);
bool operator>=(const String& string);
bool operator>=(const char *string);
bool operator>(const String& string);
bool operator>(const char *string);
bool operator<(const String& string);
bool operator<(const char *string);
char& operator[](int N);
void* operator new[](size_t N);
friend String& invert(String& string);
friend ostream& operator<<(ostream& out, String& string);
int getLength();
int getIndexOfSymbol(char symbol);
int getIndexOfWord(String& string);
String& toLower();
String& toUpper();
bool isAlpha(char &symbol);
bool isLower(char &symbol);
bool isUpper(char &symbol);
};