JPDev@programming.dev to Programmer Humor@programming.dev · 8 months agoExam Answerprogramming.devimagemessage-square128fedilinkarrow-up1793arrow-down111
arrow-up1782arrow-down1imageExam Answerprogramming.devJPDev@programming.dev to Programmer Humor@programming.dev · 8 months agomessage-square128fedilink
minus-squareSquishyPandaDev@yiffit.netlinkfedilinkarrow-up36arrow-down1·edit-28 months agoGood thing this only uses ASCii characters, else you get into some fun discussions about UTF encoding
minus-squareqaz@lemmy.worldlinkfedilinkarrow-up11·8 months agoBut does it count the null byte or not?
minus-squareSquishyPandaDev@yiffit.netlinkfedilinkarrow-up4·8 months agoIn most languages, length method doesn’t count the null terminator. Might result in some fun memory errors
Good thing this only uses ASCii characters, else you get into some fun discussions about UTF encoding
But does it count the null byte or not?
In most languages, length method doesn’t count the null terminator. Might result in some fun memory errors