1 #include <klibc/string.h>
2 #include <lunaix/compiler.h>
5 strcpy(char* dest, const char* src)
18 * @brief strcpy with constrain on numbers of character.
19 * this version is smarter than stdc, it will automatically
20 * handle the null-terminator.
28 strncpy(char* dest, const char* src, unsigned long n)
32 while (i <= n && (c = src[i]))
35 if (!(n < i && src[i - 1])) {