[phobos] std.ctype vs std.string

Jonathan M Davis jmdavisProg at gmx.com
Sun May 22 22:47:27 PDT 2011


On 2011-05-22 22:39, David Nadlinger wrote:
> On 5/23/11 7:25 AM, Jonathan M Davis wrote:
> > Would anyone be opposed to my moving the pieces of std.string which are
> > similar to std.ctype's functionality (hexdigits, letters, whitespace,
> > iswhite, etc.) into std.ctype and fixing the std.ctype functions so that
> > they're names are properly camelcased and return bool (obviously, I'd
> > leave in the old stuff as scheduled for deprecation)?
> 
> I haven't really thought about what would be the cleanest solution, but
> I agree that the current state is quite a mess. You might want to take
> std.uni in consideration as well, which contains some lonely Unicode
> character classification functions.

Yeah. I think that the unicode-specific stuff should go in std.uni and the 
ASCII stuff should go in std.ctype. So, for instance, std.string.LS and 
std.string.PS should be moved to std.uni, whereas std.string.digits and 
std.string.newline should be moved to std.ctype.

- Jonathan M Davis


More information about the phobos mailing list