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 | 29 | 30 |
Tags
- Software Engineering
- history
- web
- hadoop
- Malaysia
- MySQL
- Python
- program
- Book
- hbase
- leadership
- Italy
- Artificial Intelligence
- Linux
- agile
- Java
- QT
- erlang
- management
- ubuntu
- Spain
- France
- essay
- comic agile
- Kuala Lumpur
- django
- RFID
- Programming
- Book review
- programming_book
Archives
- Today
- Total
목록string 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