Hacker News new | past | comments | ask | show | jobs | submit login

Agreed. It's O(n) inefficient. I guess looping though chars up to `size` would perform better on average.

I see this `strlcpy` recommanded everywhere.




A few days ago people here were discussing the quadratic sscanf() behavior. strlcpy() has the same problem.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: