eliminate junk from std.string?

Lars T. Kyllingstad public at kyllingen.NOSPAMnet
Sun Jan 9 23:09:33 PST 2011


On Sun, 09 Jan 2011 16:51:57 -0600, 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.


My suggestions for things to remove:

hexdigits, digits, octdigits, lowercase, letters, uppecase, whitespace
 - What are these arrays useful for?

capwords()
 - It tries to do too much.

zfill()
 - The ljustify(),rjustify(), and center() functions
   should instead take an optional padding character
   that defaults to a space.
 
maketrans(), translate()
 - I don't even understand what these do.

inPattern(), countchars(), removechars()
 - Pattern matching is std.regex's charter.

squeeze(), succ(), tr(), soundex(), column()
 - I am having a very hard time imagining myself ever
   using these functions...


-Lars


More information about the Digitalmars-d mailing list