Bug in countUntil?
monarch_dodra
monarchdodra at gmail.com
Fri Oct 12 12:02:47 PDT 2012
I was looking in countUntil to fix another issue, and I think the
string support is broken
This program:
//----
import std.algorithm;
import std.stdio;
void main()
{
"日本語".countUntil('本').writeln();
}
//----
Will produce "3".
...
I'd have straight up said it was a bug, but the implementation
goes out of its way to special case narrow strings, when the
default implementation would have produced the right result
anyway. So I was thinking it is somehow by design...?
Am I missing something, or is it just implementation sillyness?
More information about the Digitalmars-d
mailing list