Example #1
0
 public string PrintFixedWidth(string source, int[] widths)
 {
     using var res = new StringWriter();
     FixedWidthFormat.Print(
         res,
         FixedWidthFormat.CreateParser(widths).Parse(source).Select(dl => dl.Values),
         widths);
     return(res.ToString());
 }
Example #2
0
 public string ParseFixedWidth([NotNull] string source, [NotNull] int[] widths) =>
 FixedWidthFormat
 .CreateParser(widths)
 .Parse(source)
 .Select(l => l.ToString())
 .Join("; ");