std.algorithm.among

Timon Gehr via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Jul 13 05:42:41 PDT 2014


On 07/13/2014 01:18 PM, bearophile wrote:
> The idea of not making std.algorithm.among!() a predicate was not so good:
> ...

Agreed.

>
> 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

It works with filter, so I think it should just work with until as well.


More information about the Digitalmars-d-learn mailing list