aboutsummaryrefslogtreecommitdiffstats
path: root/com32/lib/stpcpy.c
blob: 85fc49d317d4cd35a5c054c292c4605e78d446c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/*
 * stpcpy.c
 *
 * stpcpy()
 */

#include <string.h>

char *stpcpy(char *dst, const char *src)
{
  char *q = dst;
  const char *p = src;
  char ch;

  for (;;) {
    *q = ch = *p++;
    if ( !ch )
      break;
    q++;
  }

  return q;
}