146de33e8f870f5cefa74373907fb04234ea5815
[reactos.git] / lib / string / tcsncat.h
1 /* $Id$
2  */
3
4 #include <stddef.h>
5 #include <tchar.h>
6
7 _TCHAR * _tcsncat(_TCHAR * dst, const _TCHAR * src, size_t n)
8 {
9  if(n != 0)
10  {
11   _TCHAR * d = dst;
12   const _TCHAR * s = src;
13
14   while(*d != 0) ++ d;
15
16   do
17   {
18    if((*d = *s++) == 0) break;
19
20    ++ d;
21   }
22   while (--n != 0);
23
24   *d = 0;
25  }
26
27  return dst;
28 }
29
30 /* EOF */