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.
- Jonathan M Davis