Okie.
Andrej Mitrovic Wrote:
> You're right, that point totally slipped my mind. I'm having some
> ideas about an alternative though. I'll try something out later.
>
> Btw, shouldn't byLine be able to return a dchar[]? For Unicode purposes?
Why, if you want to operate on a dchar[] instead of a dchar r
You're right, that point totally slipped my mind. I'm having some
ideas about an alternative though. I'll try something out later.
Btw, shouldn't byLine be able to return a dchar[]? For Unicode purposes?
Andrej Mitrovic Wrote:
> char[] replacement;
> foreach (char[] line; file.byLine())
> {
> replacement = line.replace(regex("->"), ".")
> .replace(regex("::"), ".")
> .replace(regex("//.*"), "")
>
I've tried using this:
auto file = File("file.cpp", "r");
char[] replacement;
foreach (char[] line; file.byLine())
{
replacement = line.replace(regex("//.*"), ".");
// do something with replacement while its still alive..
}
This gives me this bombshell of an er
Vladimir Voinkov wrote:
std.regex.replace does not compile with wstring:
Correct.
Stewart.
std.regex.replace does not compile with wstring:
auto x = std.regex.regex ("abc"w);
wchar[] buffer = "abc"w.dup;
std.regex.replace (buffer, x, "def"w);