+2014-09-23 Wilco Dijkstra <wdijkstr@arm.com>
+
+ * string/strcpy.c (strcpy):
+ Improve performance by using strlen and memcpy.
+
2014-11-24 Leonhard Holz <leonhard.holz@web.de>
* string/strcoll_l.c (get_next_seq): __always_inline.
char *
strcpy (char *dest, const char *src)
{
- char c;
- char *s = (char *) src;
- const ptrdiff_t off = dest - s - 1;
-
- do
- {
- c = *s++;
- s[off] = c;
- }
- while (c != '\0');
-
- return dest;
+ return memcpy (dest, src, strlen (src) + 1));
}
libc_hidden_builtin_def (strcpy)