<PackageReference Include="NUnit" Version="4.2.1" />

StringUtil

public static class StringUtil
Provides methods to support legacy string comparison methods.
using System; using System.Runtime.CompilerServices; namespace NUnit.Framework.Internal { [System.Runtime.CompilerServices.NullableContext(1)] [System.Runtime.CompilerServices.Nullable(0)] public static class StringUtil { public static int Compare(string strA, string strB, bool ignoreCase) { StringComparison comparisonType = ignoreCase ? StringComparison.CurrentCultureIgnoreCase : StringComparison.CurrentCulture; return string.Compare(strA, strB, comparisonType); } public static bool StringsEqual(string strA, string strB, bool ignoreCase) { return Compare(strA, strB, ignoreCase) == 0; } } }