|
|
|
|
|
by fsckboy
404 days ago
|
|
>It won't null terminate the string if the buffer is filled, which will cause you all sorts of problems. if you don't know how to solve/avoid a problem like that, you will have all sorts of other problems pound-define strncopy to a compile fail, write the function you want instead, correct all the compile errors, and then, not only move on with your life, never speak of it again, for that is the waste of time. C++ std:string is trash, java strings are trash, duplicate what you want from those in your C string library and sail ahead. no language has better defined behaviors than C, that's why so many other languages, interpreters, etc. have been implemented in C. |
|