Advertisement
apieceoffruit

StringExtensions

Aug 8th, 2021
1,335
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.31 KB | None | 0 0
  1.     public static class StringExtensions
  2.     {
  3.         public static bool Matches(this string a, string b)
  4.         {
  5.             if (string.IsNullOrWhiteSpace(a) || string.IsNullOrWhiteSpace(b)) return false;
  6.             return a.Trim().Equals(b.Trim(), StringComparison.OrdinalIgnoreCase);
  7.         }
  8.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement