2 ms·
Only if your strings are null terminated; many languages do not use null termination for various reasons, and that's one of them. "Pascal strings" being the nic
by steveklabnik 8y ago
Only if your strings are null terminated; many languages do not use null termination for various reasons, and that's one of them. "Pascal strings" being the nickname, given how old this idea is, and given it was a direct competitor to C at the time.
- wyldfire 8y ago> > You really should understand how things like .size or lengh() aren’t “free” and how they work. > You're talking about strings here, right? This is not true in all languages, but certainly is for C :) I realize now that I misread this. It sounded as if you were saying '...but it is [free] for C', and on re-read I now understand that's not what you said at all.
- steveklabnik 8y agoAh, no worries! I've edited it to make it more clear, hopefully.