You need .split("\n"). String interpolation is needed to properly interpret the new line, and double quotes are one way to do that.
You need .split("\n"). String interpolation is needed to properly interpret the new line, and double quotes are one way to do that.