Am 15.10.2015 um 14:13 schrieb krzaq:

PipedProcess p = new PipedProcess("clang-format", ["-style="~style]);

p.stdin.write(code);

code = "";

for(ulong toRead = 0; toRead > 0 || p.stdout.connected; toRead = p.stdout.leastSize){
	ubyte[] buf = new ubyte[toRead];
	p.stdout.read(buf);
	code ~= buf;
}

Side note: you can also use vibe.stream.operations.readAll or
readAllUTF8 to replace the explicit read loop.