Std::string operation
#include <string>
string can be regarded as a vector of char
1. length()
2. Element access:
[], at(_index), front(), back()
3. modifier
a. insert(pos, char*), insert(pos, string str)
b. c_str -> get char*[]
c. +, push_back() --> append
pop_back()
d. erase(pos, int len)
e.
string can be regarded as a vector of char
1. length()
2. Element access:
[], at(_index), front(), back()
3. modifier
a. insert(pos, char*), insert(pos, string str)
b. c_str -> get char*[]
c. +, push_back() --> append
pop_back()
d. erase(pos, int len)
e.
Comments
Post a Comment