1
0
mirror of https://github.com/oliverbooth/X10D synced 2024-11-10 03:25:41 +00:00

Favour string.IsNullOrWhiteSpace over Length == 0 (#42)

This commit is contained in:
Oliver Booth 2022-04-20 17:03:32 +01:00
parent b6ec67d91f
commit 244f079133
No known key found for this signature in database
GPG Key ID: 32A00B35503AF634

View File

@ -235,7 +235,7 @@ public static class StringExtensions
throw new ArgumentNullException(nameof(value));
}
if (value.Length == 0)
if (string.IsNullOrWhiteSpace(value))
{
// empty string is not palindromic
return false;