D-Programming-Language/phobos — pull request #478 by jmdavis (2012-03-06 08:11:39+00:00)
Title: Fix issue 7515

I created an adjusted version of translate which is ASCII-only and
renamed maketrans to makeTrans with some minor changes. Instead of
deprecating the old translate and maketrans, maketrans is now a
deprecated alias of makeTrans, and the new ASCII-only translate should
be compatible with the old one.

The one major change which _might_ break code is that I made it so that
it uses arrays of length 128 rather than 256, since all valid ASCII
characters have a 0 in their most significant bit, making 128 in all
rather than 256. As long as code is using maketrans (as it should be),
that's not an issue, since it'll just automatically use makeTrans, which
uses 128. But if anyone constructed one on their own for some reason, it
would now be the wrong length. I don't consider that to be a high enough
risk to really be a concern though.