1. 형식: result= strep(str, repcnt)
2. 기능: 인자 str의 문자열을 repcnt회 반복한 문자열을 얻는다.
3. 설명
(1) 인자 str은 대상 문자열이며 수치이면 문자열로 변환된다.
(2) 인자 repcnt가 문자열이고 수치로 변환될 수 없을 때는 에러 처리된다.
(3) 인자 repcnt가 0보다 작거나 512보다 크면 에러 처리된다.
(4) 인자 repcnt에 소수 아래수가 있으면 절삭된다.
(5) 인자 str을 repcnt회 반복한 문자열이 result에 돌려진다.
4. 사용예
result1= strep("ABC", 3);
result2= strep(result1, 2);
printf("result1= [%s] result2= [%s]\n", result1, result2);
------------------------------ [ 출력결과 ] ------------------------------
result1= [ABCABCABC] result2= [ABCABCABCABCABCABC]
|