You can use
Source.fromFile(fileName).getLines().mkStringhowever it should be noticed that getLines() removes all new line characters.If you want save formatting you should use
Source.fromFile(fileName).iter.mkString
You can use
Source.fromFile(fileName).getLines().mkStringhowever it should be noticed that getLines() removes all new line characters.If you want save formatting you should use
Source.fromFile(fileName).iter.mkString