std.algorithm.among

bearophile via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Jul 13 04:18:04 PDT 2014


The idea of not making std.algorithm.among!() a predicate was not 
so good:


void main() {
     import std.stdio, std.algorithm;
     auto s = "hello how\nare you";
     s.until!(c => c.among!('\n', '\r')).writeln;
}


(A normal workaround is to use !!c.among!).

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list