Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- web
- Book
- Linux
- comic agile
- django
- essay
- Java
- Python
- France
- program
- management
- programming_book
- MySQL
- hbase
- leadership
- Italy
- ubuntu
- QT
- agile
- Kuala Lumpur
- Software Engineering
- Programming
- Book review
- Malaysia
- RFID
- hadoop
- Spain
- psychology
- history
- erlang
Archives
- Today
- Total
목록Replace (1)
문자열 치환(replace 함수 예제)
원본: http://mwultong.blogspot.com/2006/10/c-string-replace-all.html #include #include #include char *replaceAll(char *s, const char *olds, const char *news); void main(void){ char s[] = "봉숭아 학당! 봉숭아 학당! 봉숭아 학당! 봉숭아 학당!"; char *s2; printf("원본: %s\n", s); s2 = replaceAll(s, "봉숭아", "맹구"); // 에러가 있으면 NULL 을 리턴. 에러가 없으면 결과 출력 (s2 != NULL) ? printf("치환: %s\n", s2) : fputs("Replace String Error...\n", s..
Programming/C
2009. 10. 29. 17:37