Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- auto buf = array(new ubyte[j.toString().length+4]);
- size_t index = 0;
- buf.write!uint(cast(uint)buf.length, &index);
- buf.put(j.toString()); // Leaves buf as [0,0,0,0]
- writeln(buf);
- foreach (c; j.toString()) { // Working as intended
- buf.write!char(c, &index);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement