Stravaig-Projects / Stravaig.Extensions.Core

A set of small extensions to make life a little easier.
MIT License
0 stars 0 forks source link

string.Compare ==> IsBefore, IsAfter, IsBeforeOrEqual, etc. #40

Closed colinangusmackay closed 1 year ago

colinangusmackay commented 1 year ago

To make it easier to do string comparisons, add extension methods to string to allow folks to run a comparison like:

if (strA.IsBefore(strB)) { }
if (strA.IsAfterOrEqualTo(strB, StringComparison.CurrentCultureIgnoreCase)) { }
// etc.