3 ms·
C strings are bad for sure. Consider those raw assembly. Instead of using it directly get some decent string library ASAP and use it exclusively.
by FpUser 4y ago
C strings are bad for sure. Consider those raw assembly. Instead of using it directly get some decent string library ASAP and use it exclusively.
- jstimpfle 4y agoThey are just arrays, like everything else in the language. If you don't want to manage plain arrays, better look for a different language.
- FpUser 4y agoYou are free to make good use of strings as arrays. I've written tons of code including firmware for MCU so I think I'll keep to my own practices.
- throwawaymaths 4y agothey are not "just" arrays, they are arrays with a null-terminated expectation. Most of the time. The lack of consistency and difficulty communicating the expectations is what is hair-pulling in C, and that's on top of the difficulty of communicating the difference between an array and a pointer in C.