logoalt Hacker News

AlotOfReadingtoday at 4:16 AM1 replyview on HN

It's the usual convention for systems programming languages and has been for decades, e.g. strlen() and std::string.length(). Byte length is also just more useful in many cases.


Replies

dataflowtoday at 8:08 AM

No, those are counts by definition, and byte lengths only by coincidence. Look at wcslen() and std::wstring::length().