Пример #1
0
 /// <summary>
 /// Parses CSV.
 /// </summary>
 /// <param name="csv">The CSV text.</param>
 /// <returns>Content of CSV.</returns>
 public static IEnumerable <IReadOnlyList <string> > Parse(string csv)
 {
     return(Parse(StringExtensions.YieldSplit(csv, '\r', '\n', StringSplitOptions.RemoveEmptyEntries)));
 }
Пример #2
0
 /// <summary>
 /// Reads lines from a given text.
 /// </summary>
 /// <param name="text">The text includes multiple lines.</param>
 /// <returns>Lines.</returns>
 protected virtual IEnumerable <string> ReadLines(string text)
 {
     return(StringExtensions.YieldSplit(text, '\r', '\n', StringSplitOptions.RemoveEmptyEntries));
 }