Need help with movement from C to D
Andrey via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon May 5 04:14:55 PDT 2014
On Monday, 5 May 2014 at 09:04:29 UTC, safety0ff wrote:
> auto regex = ctRegex!(`offsetof\(([^,]+),([^)]+)\)`);
> auto sink = appender!(char[])();
> foreach (filename; args[1..$])
> {
> auto text = readText(filename);
> sink.reserve(text.length);
> replaceAllInto!(cap =>
> cap[1].strip~"."~cap[2].strip~".offsetof")(sink, text, regex);
> write(filename, sink.data);
> sink.clear();
> }
> return 0;
> }
Cool!! Thank you!!!
More information about the Digitalmars-d-learn
mailing list