strcpy

Dave Jones djones at megatest.UUCP
Sat Apr 2 13:13:21 AEST 1988


Geez.  Enough already!! 

Everybody knows what strcpy does:

void strcpy(str1, str2)
  char* str1;
  char* str2;
{
  while(*str1++ = *str2++) {;} 
}

If I remember correctly, it says as much right in K&R.  I don't
think you want to break K&R without darn good reason.

If you want a function that does something else, give it another name.
"strcpy" is already taken.


  -- Sgt. Dave Jones, Naming Conventions Police, ret.



More information about the Comp.lang.c mailing list