7 ms·
What we really should be doing is doing away with broken nomenclature. What does the "length" of a string even mean? A database will tell you it has to do wit
by implicit 13y ago
What we really should be doing is doing away with broken nomenclature.
What does the "length" of a string even mean? A database will tell you it has to do with storage. A nontechnical person will say it's the number of symbols. A visual designer might say that it has to do with onscreen width when rasterized in a particular way. None of these people are obviously right or wrong.
It's very useful to be able to count the number of glyphs in a string, or the number of unicode codepoints, or bytes, or pixels when rasterized in a particular way, but "length" isn't clear enough to unambiguously refer to any of them. Any meaning you try to ascribe to the "length" operation is going to be wrong to someone.