Substring can be simplified using range operator

This commit is contained in:
Ross Healy
2024-02-03 22:36:21 +00:00
parent 5901dd4557
commit 1b1963e7f9

View File

@@ -22,7 +22,7 @@ namespace lottery_co_uk_scraper.Utilities
if (dateString.StartsWith(prefixToIgnore))
{
// Remove the prefix before attempting to parse the date
dateString = dateString.Substring(prefixToIgnore.Length);
dateString = dateString[prefixToIgnore.Length..];
}
// Helper function to remove ordinal suffix from day