I'm evaluating D and try to write a binary io class. I got stuck with strings: void rw(ref string x) { if(_isWriting) { int size = x.length; _f.rawWrite((&size)[0..1]); _f.rawWrite(x); } else { int size; _f.rawRead((&size)[0..1]); ... what now? } } Writing is ok, but how do I read the bytes to the string x after having its size?