Am I wrong for assuming the .length should return a length in bytes? If you want to use 32bit units, then multiply your output by 4. If you want to do Unicode string manipulation and length counting, then use specific functions for that - but the base internal .length function should just output bytes.
>then multiply your output by 4. That is not how UTF-32 works. >but the base internal .length function should just output bytes. Do you think the length of an `int64_t[3]` array should be 3 or 24?
There should be functions to do both: sizeof(int64_t[3]) * sizeof(int64_t) for example to get bytes.
In this example, the base function should do bytes, and there should be a unicode function to count it in other ways.
I could be sizing to fit in a database, or send over the wire, or I might want visible space on the screen, or I might want to know how to move the cursor.
Each of those types of length should be supported.