summaryrefslogtreecommitdiff
path: root/MorgSimulator/Reader/CSVReader.cs
diff options
context:
space:
mode:
authorFuwn <[email protected]>2025-10-30 17:01:14 -0700
committerFuwn <[email protected]>2025-10-30 17:01:14 -0700
commit5cdde428a7f966f17f0a94eca7b94fbf1e499838 (patch)
tree5f94122032752e2561009ef1c5e5b6641c5fb73c /MorgSimulator/Reader/CSVReader.cs
parentrefactor(diagrams): Move present diagrams to assignment folder (diff)
downloadcst276-5cdde428a7f966f17f0a94eca7b94fbf1e499838.tar.xz
cst276-5cdde428a7f966f17f0a94eca7b94fbf1e499838.zip
feat: Implement Assignment 2 functionality
Diffstat (limited to 'MorgSimulator/Reader/CSVReader.cs')
-rw-r--r--MorgSimulator/Reader/CSVReader.cs25
1 files changed, 25 insertions, 0 deletions
diff --git a/MorgSimulator/Reader/CSVReader.cs b/MorgSimulator/Reader/CSVReader.cs
new file mode 100644
index 0000000..b678eed
--- /dev/null
+++ b/MorgSimulator/Reader/CSVReader.cs
@@ -0,0 +1,25 @@
+#nullable enable
+namespace MorgSimulator.Reader
+{
+ public class CSVReader(Reader reader) : ReaderDecorator(reader)
+ {
+ public override string? ReadLine()
+ {
+ var line = base.ReadLine();
+
+ if (line == null) return null;
+
+ return line.Trim();
+ }
+
+ public string[]? ReadCSVLine()
+ {
+ var line = ReadLine();
+
+ if (line == null) return null;
+
+ return line.Split(',');
+ }
+ }
+}
+#nullable disable