toUTFz and WinAPI GetTextExtentPoint32W

Andrej Mitrovic andrej.mitrovich at gmail.com
Tue Sep 20 14:43:27 PDT 2011


On 9/20/11, Jonathan M Davis <jmdavisProg at gmx.com> wrote:
> Or std.range.walkLength. I don't know why we really have std.utf.count. I
> just
> calls walkLength anyway. I suspect that it's a function that predates
> walkLength and was made to use walkLength after walkLength was introduced.
> But
> it's kind of pointless now.
>
> - Jonathan M Davis
>

I don't think having better-named aliases is a bad thing. Although now
I'm seeing it's not just an alias but a function.

What exactly is the "static if (E.sizeof < 4)" in there for btw? When
would the element type exceed 4 bytes while still passing the
isSomeChar contract, and then why not stop compilation at that point
instead of return "s.length"?


More information about the Digitalmars-d-learn mailing list