News for hackers. Stuff that matters.
Re:The Most Expensive One-byte Mistake (2011) by TheSoftwareGuy on Friday April 11, 2014 @10:17PM (#7576692)
>Out of the top of my head the only thing that makes '\0' terminated strings special in C is that it's the way string literals are represented. It would be trivial to recode all of string.h using addr + len instead of nul terminated.

exactly, anywhere you would have if(str[i] == NULL) you replace with if (str.s + i == str.end)

There are no comments on this comment yet.