2 ms·
(strncpy, but one that always NUL-terminates) It is trivial to write a function like strncpy_term() that adds a terminating NUL and drop it into any C project
by nitrogen 15y ago
(strncpy, but one that always NUL-terminates)
It is trivial to write a function like strncpy_term() that adds a terminating NUL and drop it into any C project you write.
Potential language support and compiler support could've been added. All of this should've been done way back in the day, but it wasn't.
I would argue that since C became the de facto high-level lingua franca of low-level programming, it was better to keep it minimalistic so that programs written in C would be as portable as possible.