[Issue 8551] Endless Split
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Aug 16 04:27:28 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8551
--- Comment #2 from Daniel Cousens <daniel350 at bigpond.com> 2012-08-16 04:27:24 PDT ---
import std.algorithm;
import std.stdio;
void main() {
auto s = "abc";
writeln(s.find("").length); // prints 3 - what the?
writeln(s.find(",").length); // prints 0 - expected
writeln(s.find("b").length); // prints 2 - expected
}
The problem is from the second implementation of the `splitter` in
std/algorithm.d (:2118). Possibly rooted in erroneous output from find (see
above).
--
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