1. 형식: result= strcount(str, find_str)
2. 기능: 인자 str에서 인자 find_str 문자열의 개수를 얻는다.
3. 설명
(1) 인자 str은 대상 문자열이며 수치이면 문자열로 변환된다.
(2) 인자 find_str은 찾을 문자열이며 수치이면 문자열로 변환된다.
(3) 찾은 문자열의 개수가 result에 돌려지며 find_str이 str에 없으면 0이
돌려진다.
4. 사용예
result1= strcount("문자열의 문자개수를 얻는다", "문자");
result2= strcount("ABCDACABAAA", "A");
printf("result1= %d result2= %d\n", result1, result2);
------------------------------ [ 출력결과 ] ------------------------------
result1= 2 result2= 6
|