3 ms·
>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 triv
by TheSoftwareGuy 13y ago
>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)