BHoM / File_Toolkit

GNU Lesser General Public License v3.0
0 stars 3 forks source link

Use aggregate for joining up the lines #179

Closed FraserGreenroyd closed 10 months ago

FraserGreenroyd commented 10 months ago
          @alelom , as discussed, you should check if `allLines` is empty before running the `Aggregate`. If empty, just return `""`, otherwise, aggregate.

It is definitely cleaner than


allLines[allLines.Count - 1] = allLines[allLines.Count - 1].Remove(allLines[allLines.Count - 1].Length - 1);

_Originally posted by @adecler in https://github.com/BHoM/File_Toolkit/issues/178#issuecomment-1887639880_