September 04, 2004 toLower, wchar_t | ||||
---|---|---|---|---|
| ||||
<nitpicking> "root.h" line 67: static int toLower(dchar c) { return isUpper(c) ? towlower(c) : c; } why two library calls here instead of just one? (isUpper becomes iswupper) am I missing something? towlower() should leave arg unchanged if already lowercase. // my suggestion static int toLower(dchar c) { towlower(c); } <crazy suggestion> in the vein of http://kx.com/a/k/connect/c/k20.h // try this, it does take some getting used to, but one gets increased code density. "dchar.h" typedef wchar_t W; |
Copyright © 1999-2021 by the D Language Foundation