source:
trunk/sys/dietlibc/wcsncpy.c
@
304
| Last change on this file since 304 was 1, checked in by , 9 years ago | |
|---|---|
| File size: 241 bytes | |
| Rev | Line | |
|---|---|---|
| [1] | 1 | #include <wchar.h> |
| 2 | ||
| 3 | wchar_t* wcsncpy(wchar_t *__restrict__ dest, const wchar_t *__restrict__ src,size_t n) { | |
| 4 | wchar_t* orig=dest; | |
| 5 | for (; dest<orig+n && (*dest=*src); ++src,++dest) ; | |
| 6 | for (; dest<orig+n; ++dest) *dest=0; | |
| 7 | return orig; | |
| 8 | } |
Note: See TracBrowser
for help on using the repository browser.
