This repository has been archived on 2024-07-04. You can view files and clone it, but cannot push or open issues or pull requests.
|
#include <string.h>
|
|
|
|
char *
|
|
strlcpy(char *dest, char *src, size_t n)
|
|
{
|
|
char *p;
|
|
|
|
p = strncpy(dest, src, n);
|
|
dest[n-1] = '\0';
|
|
|
|
return p;
|
|
}
|