diff options
Diffstat (limited to 'na/lib/string/strncpy.c')
| -rw-r--r-- | na/lib/string/strncpy.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/na/lib/string/strncpy.c b/na/lib/string/strncpy.c new file mode 100644 index 0000000..a828465 --- /dev/null +++ b/na/lib/string/strncpy.c @@ -0,0 +1,10 @@ +/* SPDX-License-Identifier: MIT */ +/* Derived from musl libc (Copyright © 2005-2020 Rich Felker, et al.) */ + +#include <string.h> + +char *strncpy(char *restrict d, const char *restrict s, size_t n) +{ + __stpncpy(d, s, n); + return d; +} |
