renamepalooza time

Lars T. Kyllingstad public at kyllingen.NOSPAMnet
Fri Jan 21 01:05:24 PST 2011


On Fri, 21 Jan 2011 01:57:39 -0600, Andrei Alexandrescu wrote:

> The following symbols in std.string don't satisfy the Phobos naming
> conventions and need to be renamed:
> 
> LS PS capwords countchars entab expandtabs hexdigits icmp iswhite
> ljustify lowercase maketrans newline octdigits removechars rjustify
> sformat splitlines stripl stripr tolower tolowerInPlace toupper
> toupperInPlace tr whitespace zfill
> 
> Opinions on what to rename?


I think the following are fine, because you would most likely write them 
as single words in ordinary text:

  entab, lowercase, newline, whitespace

These should simply be camelCased:

  countChars, expandTabs, hexDigits, removeChars, splitLines,
  toLower, toLowerInPlace, toUpper, toUpperInPlace

These should be expanded a bit and camelCased:

  LS:        lineSep, lineSeparator
  PS:        paragraphSep, paragraphSeparator
  capwords:  capitalizeWords
  iswhite:   isWhitespace
  ljustify:  leftJustify
  maketrans: makeTranslation
  octdigits: octalDigits
  rjustify:  rightJustify
  sformat:   formatString
  stripl:    stripLeft
  stripr:    stripRight
  zfill:     zeroFill

I don't know about icmp.  I guess I would prefer both cmp and icmp to be 
renamed to compare and compareCaseInsensitive.

I really have no idea what to call tr.

-Lars


More information about the Digitalmars-d mailing list