Dicebot on leaving D: It is anarchy driven development in all its glory.

ag0aep6g anonymous at example.com
Thu Sep 6 10:22:22 UTC 2018


On 09/06/2018 09:23 AM, Chris wrote:
> Python 3 gives me this:
> 
> print(len("á"))
> 1

Python 3 also gives you this:

print(len("á"))
2

(The example might not survive transfer from me to you if Unicode 
normalization happens along the way.)

That's when you enter the 'á' as 'a' followed by U+0301 (combining 
acute accent). So Python's `len` counts in code points, like D's 
std.range does (auto-decoding).


More information about the Digitalmars-d mailing list