Why is the length of this string longer than the number of characters in it?
Everyone else is giving the surface answer, but there’s a deeper rationale too: the number of “characters” is a difficult-to-define question and can be surprisingly expensive to compute, whereas a length property should be fast. Why is it difficult to define? Well, there’s a few options and none are really more valid than another: The … Read more