std.algorithm.cmp doesn't seem to support numeric types?

2019-10-16 Thread DNoob via Digitalmars-d-learn
I'm just learning D, so it's very possible that I'm missing a more appropriate function that exists elsewhere, but basically I found today that while I could easily write a cmp function that worked for everything, the one in std.algorithm doesn't seem to: import std.stdio, std.algorithm;

Re: chaining splitters

2015-03-12 Thread dnoob via Digitalmars-d-learn
Yes. That's it! Thanks a lot. On Wednesday, 11 March 2015 at 09:29:12 UTC, Dave S wrote: On Wednesday, 11 March 2015 at 00:00:39 UTC, dnoob wrote: Hello, I am parsing some text and I have the following; string text = some very long text; foreach(line; splitter(text, [13, 10])) {

chaining splitters

2015-03-10 Thread dnoob via Digitalmars-d-learn
Hello, I am parsing some text and I have the following; string text = some very long text; foreach(line; splitter(text, [13, 10])) { foreach(record; splitter(line, '*')) { foreach(field; splitter(record, '=')) {