Does anyone actually use std.string.capwords or std.string.capitalize?
Jonathan M Davis
jmdavisProg at gmx.com
Mon Jun 13 09:04:32 PDT 2011
On 2011-06-13 08:56, Jonathan M Davis wrote:
> On 2011-06-13 08:50, Andrej Mitrovic wrote:
> > It looks like people have reimplemented capitalize in some libs:
> >
> > D:\dev\lib\D\boxen\src\xf\utils\CT.d:25:pragma(ctfe) char[]
> > capitalize(char[] name) {
> > D:\dev\lib\D\boxen\src\xf\xpose2\MiniD.d:51:pragma(ctfe) private
> > char[] capitalizeFirst(char[] str) {
> > D:\dev\lib\D\boxen\src\xf\xpose2\MiniD.d:62: return "set" ~
> > capitalizeFirst(name);
> > D:\dev\lib\D\boxen\src\xf\xpose2\Utils.d:25:pragma(ctfe) char[]
> > capitalize(char[] name) {
> >
> > And I found a match here:
> > D:\dev\lib\D\enticesource\plugins.d:2317: s =
>
> std.string.capitalize(s);
>
> > I've found no match for capwords though.
>
> Well, capwords is not something you're likely to find implementations of by
> grepping, since the name has a good chance of being different. But
> regardless, I find it much easier to believe that someone is using
> capitalize than capwords, particularly since capitalize is a building
> block of capwords.
In any case, thanks for finding some evidence that capitalize is actually
being used.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list