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

I am out of the loop, but still no strlcpy equivalent? Is it still “just use snprintf”?


Just use memccpy.

Or just don't use NUL-terminated strings, seriously: zero-terminated arrays are very uncommon except when it comes to char arrays in which case they're everywhere.




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

Search: