Lines Matching defs:dest

85  * @dest: Where to copy the string to
89 char *strcpy(char *dest, const char *src)
91 char *tmp = dest;
93 while ((*dest++ = *src++) != '\0')
103 * @dest: Where to copy the string to
111 * count, the remainder of @dest will be padded with %NUL.
114 char *strncpy(char *dest, const char *src, size_t count)
116 char *tmp = dest;
124 return dest;
132 * @dest: Where to copy the string to
141 size_t strlcpy(char *dest, const char *src, size_t size)
147 memcpy(dest, src, len);
148 dest[len] = '\0';
158 * @dest: Where to copy the string to
162 * Copy the string, or as much of it as fits, into the dest buffer. The
180 ssize_t strscpy(char *dest, const char *src, size_t count)
200 /* If src or dest is unaligned, don't do word-at-a-time. */
201 if (((long) dest | (long) src) & (sizeof(long) - 1))
212 *(unsigned long *)(dest+res) = c & zero_bytemask(data);
215 *(unsigned long *)(dest+res) = c;
225 dest[res] = c;
234 dest[res-1] = '\0';
243 * @dest: Where to copy the string to
247 * Copy the string, or as much of it as fits, into the dest buffer. The
261 ssize_t strscpy_pad(char *dest, const char *src, size_t count)
265 written = strscpy(dest, src, count);
269 memset(dest + written + 1, 0, count - written - 1);
276 * stpcpy - copy a string from src to dest returning a pointer to the new end
277 * of dest, including src's %NUL-terminator. May overrun dest.
278 * @dest: pointer to end of string being copied into. Must be large enough
281 * dest.
284 * to the new %NUL-terminating character in @dest. (For strcpy, the return
285 * value is a pointer to the start of @dest). This interface is considered
290 char *stpcpy(char *__restrict__ dest, const char *__restrict__ src);
291 char *stpcpy(char *__restrict__ dest, const char *__restrict__ src)
293 while ((*dest++ = *src++) != '\0')
295 return --dest;
302 * @dest: The string to be appended to
306 char *strcat(char *dest, const char *src)
308 char *tmp = dest;
310 while (*dest)
311 dest++;
312 while ((*dest++ = *src++) != '\0')
322 * @dest: The string to be appended to
329 char *strncat(char *dest, const char *src, size_t count)
331 char *tmp = dest;
334 while (*dest)
335 dest++;
336 while ((*dest++ = *src++) != 0) {
338 *dest = '\0';
351 * @dest: The string to be appended to
355 size_t strlcat(char *dest, const char *src, size_t count)
357 size_t dsize = strlen(dest);
364 dest += dsize;
368 memcpy(dest, src, len);
369 dest[len] = 0;
877 * @dest: Where to copy to
884 void *memcpy(void *dest, const void *src, size_t count)
886 char *tmp = dest;
891 return dest;
899 * @dest: Where to copy to
905 void *memmove(void *dest, const void *src, size_t count)
910 if (dest <= src) {
911 tmp = dest;
916 tmp = dest;
923 return dest;