Skip to content

Commit

Permalink
Using string.IsNullOrWhiteSpace for better performance
Browse files Browse the repository at this point in the history
  • Loading branch information
JKamsker committed Jun 6, 2024
1 parent 8c9d617 commit 14aad1d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions LiteDB/Utils/Extensions/StringExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Security.Cryptography;
using System.Text;
Expand All @@ -8,9 +8,11 @@ namespace LiteDB
{
internal static class StringExtensions
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool IsNullOrWhiteSpace(this string str)
{
return str == null || str.Trim().Length == 0;
return string.IsNullOrWhiteSpace(str);
}
}

/// <summary>
Expand Down

0 comments on commit 14aad1d

Please sign in to comment.