string.size()
string.length()
char string::at()
char c = string[0];
string.front()
= string.at(0)
string.back()
string.insert(์ถ๊ฐํ ์์น, ๋ฌธ์์ด)
string string::find()
string.clear()
void clear();
bool empty() const;
string substr (size_t pos, size_t len) const;
string::iterrator it;
string& string::erase (size_type pos)
pos ์ดํ๋ก ์ ๋ถ ์ญ์ 2๋ฉด 3๋ถํฐ ์ญ์ .
string& string:: erase (iterator pos)
ํ ๊ธ์ ์ญ์
string& replace(size_t index, size_t len, const string& str)
index์์น์์ len๊ธธ์ด๊น์ง์ ๋ฒ์๋ฅผ ๋งค๊ฐ๋ณ์ str๋ก ๋์ฒด
'๐ > C++' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[C++] priority_queue ์ฐ์ ์์ ํ (0) | 2020.03.25 |
---|---|
[C++] ๋ฐฐ์ด๋ณต์ฌ memcpy, copy (0) | 2020.03.23 |
[C++] map iterator(๋ฐ๋ณต์) ํ์ฉ (0) | 2020.03.23 |
[C++] vector ๋ฐฐ์ด ์ค๋ณต ์ ๊ฑฐ ํ๋ ๋ฒ (0) | 2020.03.10 |
[C++] int to string, string to int | to_string, stoi (0) | 2020.03.10 |
๋๊ธ