Improved unicode fileio support.
[reactos.git] / reactos / lib / msvcrt / wstring / wcsncat.c
1 /* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
2 #include <msvcrt/wchar.h>
3
4 wchar_t *wcsncat(wchar_t *dst, const wchar_t *src, size_t n)
5 {
6 if (n != 0)
7 {
8 wchar_t *d = dst;
9 const wchar_t *s = src;
10
11 while (*d != 0)
12 d++;
13 do {
14 if ((*d = *s++) == 0)
15 break;
16 d++;
17 } while (--n != 0);
18 *d = 0;
19 }
20 return dst;
21 }