Cleanup and overhaul (#21)

* Syntax cleanup

* More minor cleanup, use Linq

* Fix broken features by using correct values

* Feature flags the same

* Features are modular

* No AlphaFS, more .NET versions

* Fix appveyor

* Put back identifiers, for some reason

* String interpolation, modernization

* Better use of GetField

* XmlTextWriter to remove possible issues

* Fix header for OpenMSX
This commit is contained in:
Matt Nadareski
2020-06-10 22:37:19 -07:00
committed by GitHub
parent f01e47444c
commit 4ad77d6be6
75 changed files with 6945 additions and 7249 deletions

View File

@@ -155,13 +155,13 @@ namespace SabreTools.Library.DatFiles
{
string needleString = needle as string;
string strawString = straw as string;
if (!String.IsNullOrWhiteSpace(strawString) && needleString != null)
if (!string.IsNullOrWhiteSpace(strawString) && needleString != null)
{
string regexStraw = strawString;
// If the straw has no special characters at all (excluding whitespace), treat it as an exact match
if (regexStraw == Regex.Escape(regexStraw).Replace("\\ ", " "))
regexStraw = "^" + regexStraw + "$";
regexStraw = $"^{regexStraw}$";
// Check if a match is found with the regex
found |= Regex.IsMatch(needleString, regexStraw, RegexOptions.IgnoreCase | RegexOptions.CultureInvariant);