D-Programming-Language/phobos — pull request #1042 by monarchdodra (2012-12-29 16:13:07+00:00)
Title: Fix previous bug in countUntil

As pointed out by denish-sh in:
https://github.com/D-Programming-Language/phobos/pull/1024
Also, more unittests.

To note: This actually fixes another (pre-existing) bug, where comparing two empty no-length ranges would actually return -1, whereas it should return 0:

```D
assert(countUntil("", "") == 0); //before-after
assert(countUntil("".filter!"true"(), "") == -1); //before
assert(countUntil("".filter!"true"(), "") == 0); //after
```

--------
I'm actually at relatives', and can't deploy a full testing environment, so I'm coding blind on github-web. My apologies if this doesn't pass the testers the first time. Please don't merge until the D2 tester is finished.