News for hackers. Stuff that matters.
Re:Ask HN: Preferred string copy function in C? by cd34 on Monday April 30, 2012 @09:18PM (#3912497)
Depending on your requirements, each has its benefits and drawbacks. Depending on your architecture, there are versions that are faster than the libc version.

None of the functions you have listed are true equivalents, so, your situation will dictate which you need to use.

Re:Ask HN: Preferred string copy function in C? by codehero on Monday April 30, 2012 @09:29PM (#3912538)
strcpy and stpcpy are functionally equivalent, but differ only in return value. stpcpy is superior because it points to the end of the string, thus letting the caller know how many bytes were copied.
Re:Ask HN: Preferred string copy function in C? by steve-howard on Tuesday May 01, 2012 @12:36AM (#3913003)
strdup is nice, but it always depends on your use case.

memcpy is probably best if you're keeping track of lengths separately.

Re:Ask HN: Preferred string copy function in C? by tlb on Monday April 30, 2012 @09:25PM (#3912522)
strlcpy