date and time created 87/02/15 16:16:45 by lepreau
[unix-history] / usr / src / local / sccscmds / sccscmds.2 / util / repeat.c
CommitLineData
7c9c5d18 1static char Sccsid[] = "@(#)repeat.c 1.2 %G%";
61af4334
JL
2/*
3 Set `result' equal to `str' repeated `repfac' times.
4 Return `result'.
5*/
6
7char *repeat(result,str,repfac)
8char *result, *str;
9register unsigned repfac;
10{
11 register char *r, *s;
12
13 r = result;
14 for (++repfac; --repfac > 0; --r)
15 for (s=str; *r++ = *s++; );
16 *r = '\0';
17 return(result);
18}