Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Note that I mentioned the ordinary memcpy (with a single c) there briefly. memccpy should under no circumstances be faster than strcpy for "string multiplying", as it holds no advantages over it in that use.


Ouch, my mistake.

In any case, could we sum it up? In what cases should memccpy be used over, say, str{n,l}cpy, or even memcpy, and is it in conflict with the article's recommendation or its statement on performance regarding memccpy vs. the alternatives?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: