strcpy

Ray Butterworth rbutterworth at watmath.waterloo.edu
Fri Apr 1 01:46:30 AEST 1988


In article <836 at cresswell.quintus.UUCP>, ok at quintus.UUCP (Richard A. O'Keefe) writes:
> If the memcpy() question was solved by adding a memmove(), is there
> also a strmove() in the current dpANS draft?

You could

#define strmove(out,in) ((char*)memmove((void*)out, (void*)in, 1+strlen(in)))

if it weren't for the fact that the identifier "strmove" is already
reserved by the Standard.

(If I got the return value of memmove() wrong, please don't bother
posting to tell me.  I don't have a copy of the Standard with me.)



More information about the Comp.lang.c mailing list