"C++ replace()"의 두 판 사이의 차이

24번째 줄: 24번째 줄:
* http://www.cplusplus.com/reference/string/string/replace/
* http://www.cplusplus.com/reference/string/string/replace/


[[분류: C++ 문자열]]
[[분류: C++ algorithm]]
[[분류: C++ algorithm]]

2019년 3월 17일 (일) 22:59 판

1 개요

C++ replace()
#include <iostream>
#include <algorithm>
using namespace std;
int main() {
  string s = "hello world";
  replace( s.begin(), s.end(), 'l', 'm');
  cout << s << endl;
  // hemmo wormd
}

2 같이 보기

3 참고

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