Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 1 | #include <wchar.h> |
2 | |||||
Rich Felker | 400c5e5 | 2012-09-06 22:44:55 -0400 | [diff] [blame] | 3 | wchar_t *wcsncat(wchar_t *restrict d, const wchar_t *restrict s, size_t n) |
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 4 | { |
5 | wchar_t *a = d; | ||||
6 | d += wcslen(d); | ||||
Rich Felker | 86339bc | 2011-05-22 21:58:43 -0400 | [diff] [blame] | 7 | while (n && *s) n--, *d++ = *s++; |
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 8 | *d++ = 0; |
9 | return a; | ||||
10 | } |