http://d.puremagic.com/issues/show_bug.cgi?id=5257


jakobov...@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakobov...@gmail.com


--- Comment #2 from jakobov...@gmail.com 2010-11-22 12:28:48 PST ---
This is almost entirely off-topic, but I don't think such a tiny change
deserves its own issue... sorry if I should have :(

When this gets fixed, count() will be useful as a generic way to count the
amount of code points in a UTF encoded string. But I don't think the interface
is very pretty for this simple use case.

As a completely non-breaking change, how about changing:
size_t count(alias pred, Range)(Range r) if (isInputRange!(Range))

to:
size_t count(alias pred = "true", Range)(Range r) if (isInputRange!(Range))

So one could simply do count("日本語")?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to