eliminate junk from std.string?

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Tue Jan 11 08:40:14 PST 2011


On 1/11/11 6:34 AM, Ary Borenszweig wrote:
> Oh, one more thing: can the names be consistent?
>
> inpattern
> countChars
> expandtabs
> chompPrefix
> toupper
> toupperInPlace ??
>
> If this can't be done for backwards compatibility maybe you can make alias for the
> previous ones.

The names are for compatibility with... other languages :o|.

> Also:
>
> stripl
> stripr
> strip
>
> Strips *l*eading and *t*railing whitespaces...
>
> It took me some time to notice that it was strip*r* (for right), but the comment
> says "trailing", and I never think of "remove right space", always "remove
> trailing spaces" (like in the comment!). So why not name that function "stript"?

Same thing. These names are imported from other languages.


Andrei


More information about the Digitalmars-d mailing list