The Case Against Autodecode

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Thu Jun 2 14:23:45 PDT 2016


On 6/2/16 5:19 PM, Timon Gehr wrote:
> On 02.06.2016 23:16, Timon Gehr wrote:
>> On 02.06.2016 23:06, Andrei Alexandrescu wrote:
>>> As the examples show, the examples would be entirely meaningless at code
>>> unit level.
>>
>> So far, I needed to count the number of characters 'ö' inside some
>> string exactly zero times,
>
> (Obviously this isn't even what the example would do. I predict I will
> never need to count the number of code points 'ö' by calling some
> function from std.algorithm directly.)

You may look for a specific dchar, and it'll work. How about 
findAmong("...") with a bunch of ASCII and Unicode punctuation symbols? 
-- Andrei




More information about the Digitalmars-d mailing list