- Cleanup the /lib directory, by putting more 3rd-party libs in /3rdparty, and by...
[reactos.git] / reactos / lib / sdk / crt / wstring / wcsxfrm.c
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS system libraries
4 * FILE: lib/crt/??????
5 * PURPOSE: Unknown
6 * PROGRAMER: Unknown
7 * UPDATE HISTORY:
8 * 25/11/05: Added license header
9 */
10
11 #include <precomp.h>
12
13 /*
14 * @implemented
15 */
16 size_t wcsxfrm(wchar_t *dst,const wchar_t *src, size_t n)
17 {
18 size_t r = 0;
19 int c;
20
21 if (n != 0) {
22 while ((c = *src++) != 0)
23 {
24 r++;
25 if (--n == 0)
26 {
27 while (*src++ != 0)
28 r++;
29 break;
30 }
31 *dst++ = c;
32 }
33 *dst = 0;
34 }
35 return r;
36 }