Home | History | Annotate | Download | only in src

Lines Matching refs:dst

38  * Appends src to string dst of size siz (unlike strncat, siz is the
39 * full size of dst, not space left). At most siz-1 characters
40 * will be copied. Always NUL terminates (unless siz <= strlen(dst)).
41 * Returns strlen(src) + MIN(siz, strlen(initial dst)).
45 strlcat(char *dst, const char *src, size_t siz)
48 char *d = dst;
53 _DIAGASSERT(dst != NULL);
56 /* Find the end of dst and adjust bytes left but don't go past end */
59 dlen = d - dst;
75 _DIAGASSERT(dst != NULL);
79 * Find length of string in dst (maxing out at siz).
81 size_t dlen = strnlen(dst, siz);
84 * Copy src into any remaining space in dst (truncating if needed).
85 * Note strlcpy(dst, src, 0) returns strlen(src).
87 return dlen + strlcpy(dst + dlen, src, siz - dlen);