Andrei Alexandrescu Wrote:

> On 1/9/11 4:51 PM, Andrei Alexandrescu wrote:
> > There's a lot of junk in std.string that should be gone. I'm trying to
> > motivate myself to port some functions to different string widths and...
> > it's not worth it.
> >
> > What functions do you think we should remove from std.string? Let's make
> > a string and then send them the way of the dino.
> >
> >
> > Thanks,
> >
> > Andrei
> 
> I have uploaded a preview of the changed APIs here:
> 
> http://d-programming-language.org/cutting-edge/phobos/std_string.html

Unclear if iswhite() refers to ASCII whitespace or Unicode.  If Unicode, which 
version of the standard?
Same comment for icmp().  Also, in the Unicode standard, case folding can 
depend on the specific language.

There is room for ascii-only functions, but unless a D version of ICU is going 
to be done separately, it would be nice to have full unicode-aware functions 
available.

You've got chop() marked as deprecated.  Is popBack() going to make sense as 
something that removes a variable number of chars from a string in the CR-LF 
case?  That might be a bit too magical.

Rather than zfill, what about modifying ljustify, rjustify, and center to take 
an optional fill character?

One set of functions I'd like to see are startsWith() and endsWith().  I find 
them frequently useful in Java and an irritating lack in the C++ standard 
library.

Jerry









Reply via email to