News for hackers. Stuff that matters.
Re:Efficient string copying and concatenation in C by akersten on Thursday September 12, 2019 @12:36PM (#20953473)
I wouldn't prefer one more special case to test against (empty string / null string / 'invalid' string). Why can't those operations just return error codes instead? How about memcpy if you try to memcpy into a buffer that's too small - it writes an 'invalid buffer' type instead?
Re:Efficient string copying and concatenation in C by codehero on Thursday September 12, 2019 @12:57PM (#20953710)
Propagating NAN is an elegant method in floating point and makes sense for well defined string encodings like UTF-8.

memcpy and company are strictly for raw unencoded buffers.