phobos breakage... why?
Jonathan M Davis
jmdavisProg at gmx.com
Wed Jul 25 11:56:22 PDT 2012
On Wednesday, July 25, 2012 20:14:06 Andrej Mitrovic wrote:
> On 7/25/12, Jonathan M Davis <jmdavisProg at gmx.com> wrote:
> > As the documentation says, the
> > problem
> > was that it was just too easily confused with std.string.indexOf which is
> > subtlely different.
>
> I've always wondered how it's different? Using countUntil on strings
> seems to work ok for me, or should I be using string.indexOf?
code units vs code points.
string.indexOf will give you the number of code units
std.algorithm.countUntil will give you the number of code points
All it takes is having imported std.algorithm and std.string, and you could be
getting a function which is doing completely the wrong thing for your code.
That's why it was changed.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list