find
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++ 문자열 조회하기(find)
c++ 문자열 조회하기(find)
2020.10.28#include #include using namespace std; int main() { string alpa = "abcdefghijklmnopqrst"; int rtn = alpa.find("jk"); if (rtn > 0) cout