std.string inPattern() and UTF symbols

Fra Fra at b.it
Mon Dec 9 09:58:18 PST 2013


On Monday, 9 December 2013 at 16:10:34 UTC, qznc wrote:
> On Monday, 9 December 2013 at 15:58:53 UTC, qznc wrote:
>> I also smell a unicode bug, due to the combination of foreach 
>> and length.
>
> Bug reported. :)
>
> https://d.puremagic.com/issues/show_bug.cgi?id=11712
>
> That is probably not the root of Fras problem, though.

Your ticket:
"The following assert fails, but should not.

assert(!inPattern('a', "äöüa-z"));"

Actually, 'a' IS in the given pattern, so the inPattern should 
return true, then you negate it and therefore it fails. Long 
story short, it should fail, and it does. So your bug report is 
actually incorrect.


More information about the Digitalmars-d-learn mailing list