[Issue 5257] New: std.algorithm.count works incorrectly with UTF8 and UTF16 strings
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Nov 22 10:55:20 PST 2010
http://d.puremagic.com/issues/show_bug.cgi?id=5257
Summary: std.algorithm.count works incorrectly with UTF8 and
UTF16 strings
Product: D
Version: D2
Platform: Other
OS/Version: Mac OS X
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: andrei at metalanguage.com
--- Comment #0 from Andrei Alexandrescu <andrei at metalanguage.com> 2010-11-22 10:54:01 PST ---
import std.stdio;
import std.algorithm;
void main() {
writeln(count!("true")("日本語")); // Three characters.
}
The code prints 9 but should print 3.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list