Hi all It's me again ;-)
(because you're very strong in Dlang, here...)
In want a result as i write in a comment, with remove unwanted '\r' >>

import std.stdio;
import std.file;
import std.conv;
import std.process : executeShell;

/* Content of 'values.txt' >>
   abcd
   1234
   03b52h
*/

void main() {
        auto fichier = File("values.txt", "r+");
        string[] buffer;
  foreach (line ; File("values.txt").byLine)
    buffer ~= line.to!string;

  writeln(buffer);
  // Result: ["abcd\r", "1234\r", "03b52h"]

  writeln(buffer[0], " - ", buffer[1], " - ", buffer[2]);
  // Result:  - 03b52h    :-(

  // Instead, i would :  abcd - 1234 - 03b52h  !!!

executeShell("pause");
fichier.close();
}

Thanks a lot, by advance :-)


Reply via email to