string
c++ 문자열 일부 교체하기(replace)
c++ 문자열 일부 교체하기(replace)
2020.10.30#include #include using namespace std; int main() { string sentence = "i like coding"; string find_str = "coding"; string replace_str = "history"; sentence.replace(sentence.find(find_str), find_str.length(), replace_str); cout
c++ 문자열 이동하기(move)
c++ 문자열 이동하기(move)
2020.10.30#include #include #include using namespace std; int main() { string str1 = "i like coding"; string str2 = move(str1); cout
c++ 문자열 일부 지우기(erase)
c++ 문자열 일부 지우기(erase)
2020.10.29#include #include using namespace std; int main() { string sentence = "i hate coding"; sentence.erase(0, 7); cout
c++ 문자열 중간에 삽입하기
c++ 문자열 중간에 삽입하기
2020.10.28#include #include using namespace std; int main() { string sentence = "i coding"; sentence.insert(2, "hate "); cout
c++ 문자열 길이 구하기
c++ 문자열 길이 구하기
2020.10.28#include #include using namespace std; int main() { string fist_name = "ha"; string last_name = "jong yun"; cout