I have a file which contains certain string like -
Apple
Google
Microsoft
I am reading in this file as
val lines = scala.io.Source.fromFile(filePath).mkString.replace("\n", ",")
Which results in a comma separated list of string. However what I really want is "Apple","Google","Microsoft"
If I add double quotes in the string replace while reading in the file I while have to take care of the first and last double quotes which won't be ideal. How should I go about this?