October 01, 2016 [Issue 16569] Assertion failure on splitter.back on empty string | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=16569 b2.temp@gmx.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |b2.temp@gmx.com Resolution|--- |INVALID --- Comment #1 from b2.temp@gmx.com --- It's not a bug. splitter returns a range, in your case this range is empty. The way of iterating/using a range is always to test for emptiness before using front/back or popFront/Back: auto rng = str.splitter('.'); if (!rng.empty) writeln(rng.back); -- |
March 21, 2020 [Issue 16569] Assertion failure on splitter.back on empty string | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=16569 Basile-z <b2.temp@gmx.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC|b2.temp@gmx.com | -- |
Copyright © 1999-2021 by the D Language Foundation