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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
|
class string {
public:
string();
string(const string& str);
string(const string& str, size_t pos, size_t len = npos);
string(const char* s);
string(const char* s, size_t n);
string(size_t n, char c);
template <class InputIterator> string(InputIterator first, InputIterator last);
string(initializer_list<char> il);
string(string&& str) noexcept;
~string();
string& operator=(const string& str);
string& operator=(const char* s);
string& operator=(char c);
string& operator=(initializer_list<char> il);
string& operator=(string&& str) noexcept;
// Iterators
iterator begin() noexcept;
const_iterator begin() const noexcept;
iterator end() noexcept;
const_iterator end() const noexcept;
reverse_iterator rbegin() noexcept;
const_reverse_iterator rbegin() const noexcept;
reverse_iterator rend() noexcept;
const_reverse_iterator rend() const noexcept;
const_iterator cbegin() const noexcept;
const_iterator cend() const noexcept;
const_reverse_iterator crbegin() const noexcept;
const_reverse_iterator crend() const noexcept;
// Capacity
size_t size() const noexcept;
size_t length() const noexcept;
size_t max_size() const noexcept;
void resize(size_t n);
void resize(size_t n, char c);
size_t capacity() const noexcept;
void reserve(size_t n = 0);
void clear() noexcept;
bool empty() const noexcept;
void shrink_to_fit();
// Element Access
char& operator[](size_t pos);
const char& operator[](size_t pos) const;
char& at(size_t pos);
const char& at(size_t pos) const;
char& back();
const char& back() const;
char& front();
const char& front() const;
// Modifiers
string& operator+=(const string& str);
string& operator+=(const char* s);
string& operator+=(char c);
string& operator+=(initializer_list<char> il);
string& append(const string& str);
string& append(const string& str, size_t subpos, size_t sublen);
string& append(const char* s);
string& append(const char* s, size_t n);
string& append(size_t n, char c);
template <class InputIterator> string& append(InputIterator first, InputIterator last);
string& append(initializer_list<char> il);
void push_back(char c);
string& assign(const string& str);
string& assign(const string& str, size_t subpos, size_t sublen);
string& assign(const char* s);
string& assign(const char* s, size_t n);
string& assign(size_t n, char c);
template <class InputIterator> string& assign(InputIterator first, InputIterator last);
string& assign(initializer_list<char> il);
string& assign(string&& str) noexcept;
string& insert(size_t pos, const string& str);
string& insert(size_t pos, const string& str, size_t subpos, size_t sublen);
string& insert(size_t pos, const char* s);
string& insert(size_t pos, const char* s, size_t n);
string& insert(size_t pos, size_t n, char c);
iterator insert(const_iterator p, size_t n, char c);
iterator insert(const_iterator p, char c);
template <class InputIterator> iterator insert(iterator p, InputIterator first, InputIterator last);
string& insert(const_iterator p, initializer_list<char> il);
string& erase(size_t pos = 0, size_t len = npos);
iterator erase(const_iterator p);
iterator erase(const_iterator first, const_iterator last);
string& replace(size_t pos, size_t len, const string& str);
string& replace(const_iterator i1, const_iterator i2, const string& str);
string& replace(size_t pos, size_t len, const string& str, size_t subpos, size_t sublen);
string& replace(size_t pos, size_t len, const char* s);
string& replace(const_iterator i1, const_iterator i2, const char* s);
string& replace(size_t pos, size_t len, const char* s, size_t n);
string& replace(const_iterator i1, const_iterator i2, const char* s, size_t n);
string& replace(size_t pos, size_t len, size_t n, char c);
string& replace(const_iterator i1, const_iterator i2, size_t n, char c);
template <class InputIterator> string& replace(const_iterator i1, const_iterator i2, InputIterator first, InputIterator last);
string& replace(const_iterator i1, const_iterator i2, initializer_list<char> il);
void swap(string& str);
void pop_back();
// String Operations
const char* c_str() const noexcept;
const char* data() const noexcept;
allocator_type get_allocator() const noexcept;
size_t copy(char* s, size_t len, size_t pos = 0) const;
size_t find(const string& str, size_t pos = 0) const noexcept;
size_t find(const char* s, size_t pos = 0) const;
size_t find(const char* s, size_t pos, size_type n) const;
size_t find(char c, size_t pos = 0) const noexcept;
size_t rfind(const string& str, size_t pos = npos) const noexcept;
size_t rfind(const char* s, size_t pos = npos) const;
size_t rfind(const char* s, size_t pos, size_t n) const;
size_t rfind(char c, size_t pos = npos) const noexcept;
size_t find_first_of(const string& str, size_t pos = 0) const noexcept;
size_t find_first_of(const char* s, size_t pos = 0) const;
size_t find_first_of(const char* s, size_t pos, size_t n) const;
size_t find_first_of(char c, size_t pos = 0) const noexcept;
size_t find_last_of(const string& str, size_t pos = npos) const noexcept;
size_t find_last_of(const char* s, size_t pos = npos) const;
size_t find_last_of(const char* s, size_t pos, size_t n) const;
size_t find_last_of(char c, size_t pos = npos) const noexcept;
size_t find_first_not_of(const string& str, size_t pos = 0) const noexcept;
size_t find_first_not_of(const char* s, size_t pos = 0) const;
size_t find_first_not_of(const char* s, size_t pos, size_t n) const;
size_t find_first_not_of(char c, size_t pos = 0) const noexcept;
size_t find_last_not_of(const string& str, size_t pos = npos) const noexcept;
size_t find_last_not_of(const char* s, size_t pos = npos) const;
size_t find_last_not_of(const char* s, size_t pos, size_t n) const;
size_t find_last_not_of(char c, size_t pos = npos) const noexcept;
string substr(size_t pos = 0, size_t len = npos) const;
int compare(const string& str) const noexcept;
int compare(size_t pos, size_t len, const string& str) const;
int compare(size_t pos, size_t len, const string& str, size_t subpos, size_t sublen) const;
int compare(const char* s) const;
int compare(size_t pos, size_t len, const char* s) const;
int compare(size_t pos, size_t len, const char* s, size_t n) const;
// Member Constants
static const size_t npos = -1;
};
|