private static IEnumerable<string> stringToLines(string str) { return str.Split('\n').Select(Line => Line.Trim()).Where(Line => Line.Length > 0); }