Inconsitency
Dicebot
public at dicebot.lv
Sun Oct 13 06:16:49 PDT 2013
On Sunday, 13 October 2013 at 13:14:59 UTC, nickles wrote:
> I do not agree:
>
> writeln("säд".length); => 5 chars: 5 (1 + 2 [C3A4] +
> 2 [D094], UTF-8)
> writeln(std.utf.count("säд")) => 3 chars: 5 (ibidem)
> writeln("säд"w.length); => 3 chars: 6 (2 x 3, UTF-16)
> writeln("säд"d.length); => 3 chars: 12 (4 x 3, UTF-32)
>
> This is not consistent - from my point of view.
Because you have wrong understanding of what does "length" mean.
More information about the Digitalmars-d
mailing list