Substring can be simplified using range operator
This commit is contained in:
@@ -22,7 +22,7 @@ namespace lottery_co_uk_scraper.Utilities
|
|||||||
if (dateString.StartsWith(prefixToIgnore))
|
if (dateString.StartsWith(prefixToIgnore))
|
||||||
{
|
{
|
||||||
// Remove the prefix before attempting to parse the date
|
// 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
|
// Helper function to remove ordinal suffix from day
|
||||||
|
|||||||
Reference in New Issue
Block a user