C++ 문자열 replace()

Jmnote (토론 | 기여)님의 2023년 10월 28일 (토) 11:21 판 (새 문서: ==개요== ;C++ 문자열 replace() <syntaxhighlight lang='cpp' run> #include <iostream> using namespace std; int main() { string input = "hello world"; string output = inpu...)
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)

1 개요[ | ]

C++ 문자열 replace()
#include <iostream>
using namespace std;

int main() {
    string input = "hello world";
    string output = input.replace(0, 5, "yellow");
    cout << output; // yellow world
}

2 같이 보기[ | ]

3 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}