strcpy
Chris Torek
chris at mimsy.UUCP
Tue Mar 22 03:50:36 AEST 1988
>In article <10731 at mimsy.UUCP> I wrote:
>> /* remove leading junk (n < strlen(buf)) */
>> (void) strcpy(buf, buf + n);
In article <7506 at brl-smoke.ARPA> gwyn at brl-smoke.ARPA (Doug Gwyn) writes:
>This usage was never a good idea, because a valid implementation of
>strcpy() would be to copy right-to-left rather than left-to-right
`That turns out not to be the case'---or rather, are you certain?
I agree that a generic block copy operation (one of {memcpy, memmove}
---I cannot remember which allows overlap) might do this; I do not
agree that strcpy() may be implemented that way. (I could be wrong.)
--
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain: chris at mimsy.umd.edu Path: uunet!mimsy!chris
More information about the Comp.lang.c
mailing list