25 static size_t G__strlcpy(
char *restrict dst,
const char *restrict src,
52 size_t G_strlcpy(
char *dst,
const char *src,
size_t dsize)
55 return strlcpy(dst, src, dsize);
57 return G__strlcpy(dst, src, dsize);
61 static size_t G__strlcpy(
char *restrict dst,
const char *restrict src,
64 const char *osrc = src;
69 while (--nleft != 0) {
70 if ((*dst++ = *src++) ==
'\0')
83 return (src - osrc - 1);
size_t G_strlcpy(char *dst, const char *src, size_t dsize)
Safe string copy function.