Skip to content

Commit

Permalink
Updated some matching expressions.
Browse files Browse the repository at this point in the history
  • Loading branch information
tompazourek committed Apr 30, 2021
1 parent f5f7301 commit 890eb84
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/NaturalSort.Extension/NaturalSortComparer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public int Compare(string str1, string str2)
if (paddingCompare != 0)
return paddingCompare;
}
else if (_stringComparer != null)
else if (_stringComparer is not null)
{
// compare both tokens as strings
var tokenString1 = str1.Substring(startIndex1, rangeLength1);
Expand Down Expand Up @@ -176,7 +176,7 @@ private static byte GetTokenFromChar(char c)
? c <= 'Z'
? TokenLetters
: TokenOther
: c >= '0' && c <= '9'
: c is >= '0' and <= '9'
? TokenDigits
: TokenOther;
}
Expand Down

0 comments on commit 890eb84

Please sign in to comment.