OSDN Git Service

first commit
[winexe-harib/winexe-harib.git] / golibc / strcat.c
1 //*****************************************************************************
2 // strcat.c : string function
3 // 2002/02/04 by Gaku : this is rough sketch
4 //*****************************************************************************
5
6 #include <stddef.h>
7
8 //=============================================================================
9 // append S to D
10 //=============================================================================
11 extern "C" char* strcat (char *d, const char *s)
12 {
13         char *tmp = d;
14
15         while ('\0' != *d)
16                 d++;
17
18         while ('\0' != *s)
19                 *d++ = *s++;
20
21         *d = '\0';
22
23         return tmp;
24 }