1、http://www.cplusplus.com/reference/cstring/ 中右边后涉及的所有功能。(共24个)
2、实现以下功能。(共9个)。功能描述与使用见:
http://www.cplusplus.com/reference/string/
Stoi, stol, stoul, stoll, stoull, stof, stod, stold, to_string
3、Construct string object。(共6个)。功能描述与使用见:http://www.cplusplus.com/reference/string/string/string/
Constructs a string object, initializing its value depending on the constructor version used:
(1) empty string constructor (default constructor)
(2) copy constructor
(3) substring constructor
(4) from c-string
(5) from buffer
(6) fill constructor
4、实现以下功能。(共40个)功能描述与使用见:
http://www.cplusplus.com/reference/string/string/
(destructor), operator=, size, length
Capacity:
size, length, max_size, resize, capacity, reserve, clear, empty, shrink_to_fit
Element access:
operator[], at, back, front
Modifiers:
operator+=, append, push_back, assign, insert, erase, replace, swap, pop_back
String operations:
Data, copy, find, rfind, find_first_of, find_last_of, find_first_not_of, find_last_not_of, substr, compare
Non-member function overloads:
operator+, relational operators, swap, operator>>, operator<<, getline
5、测试 测试以上功能是否正确实现