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!!!