tools.ctfe for D1

FeepingCreature default_357-line at yahoo.de
Wed Apr 21 03:43:00 PDT 2010


On 20.04.2010 01:49, Ellery Newcomer wrote:
> Are there any good libraries for ctfe/code generation?
> 
> I don't know, things like parsing support for compile time strings,
> string formatting, type <-> string
> 
> My project seems to be growing ctfe, and it's all horribly hacky and
> ugly code.

This might be useful if you're on D1: http://dsource.org/projects/scrapple/browser/trunk/tools/tools/ctfe.d

Contents:

 * ctToString(int)
 * ctAtoi(string)
 * ctToLower(string)
 * ctFind(string, string)
 * ctFind(string, char)
 * ctRFind(string, string)
 * ctStripL(string)
 * ctStripR(string)
 * ctStrip(string)
 * ctSlice(ref string, string where, bool cutOff = true)
 * ctReplace(string, string, string)
 * ctBetween(string text, string from, string to, bool adhere_right = false)
 * ctReplace(string, string, string{, string, string})
 * Table parsing code (ctTableHeight, ctTableWidth, ctTableUnrollColMajor, ctTableUnroll, ctTableUnrollColumn, ctTableLookup and related)
 * ctExpand (turns "foo, bar(0, 1)baz" into "|foo|bar0baz|bar1baz", used for simpler enum generation)


More information about the Digitalmars-d-learn mailing list