In windows newlines are “\r\n”.
readUntilDelimiterOrEof actually reads “abcdefghi\r”.
When “\r” is printed in the terminal it moves the cursor at the start of line.
This does not happens at all on linux because newlines are “\n”.
One way to handle it is using std.mem.trimRight or:
var line = try stdIn.readUntilDelimiterOrEof(&input, '\n') orelse return error.NoLine;
const end = line.len -1;
if (line[end] == '\r') {
line = line[0..end];
}