mirror of
https://github.com/tailix/kernel.git
synced 2024-12-04 11:34:42 -05:00
10 lines
204 B
C
10 lines
204 B
C
char *kstrncpy(char *const dest, const char *const src, const unsigned long slen)
|
|
{
|
|
for (unsigned long i = 0; i < slen; ++i) {
|
|
dest[i] = src[i];
|
|
}
|
|
|
|
dest[slen] = 0;
|
|
|
|
return dest;
|
|
}
|