From 4e768bc3ed144441bd5373bfcc10dd28997ea073 Mon Sep 17 00:00:00 2001 From: Valentin Tyrichev Date: Thu, 5 Dec 2024 09:42:04 +0400 Subject: [PATCH] Updated DiamondTests.cs `Rows` method adjusted to use system dependent new line characters. --- exercises/practice/diamond/DiamondTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/practice/diamond/DiamondTests.cs b/exercises/practice/diamond/DiamondTests.cs index fa8342551e..6de1de0cd9 100644 --- a/exercises/practice/diamond/DiamondTests.cs +++ b/exercises/practice/diamond/DiamondTests.cs @@ -7,7 +7,7 @@ public class DiamondTests { public static readonly char[] AllLetters = GetLetterRange('A', 'Z'); - private static string[] Rows(string x) => x.Split(new[] { '\n' }, StringSplitOptions.None); + private static string[] Rows(string x) => x.Split(Environment.NewLine); private static string LeadingSpaces(string x) => x.Substring(0, x.IndexOfAny(AllLetters)); private static string TrailingSpaces(string x) => x.Substring(x.LastIndexOfAny(AllLetters) + 1); @@ -125,4 +125,4 @@ public static Arbitrary Chars() { return Arb.Default.Char().Filter(x => x >= 'A' && x <= 'Z'); } -} \ No newline at end of file +}