Stravaig.Extensions.Core

A set of small extensions to make life a little easier.

View on GitHub View on NuGet
Documentation last built on Thursday, 16 November, 2023

string.IsBeforeOrEqualTo(…)

An extension method to determine if a string comes before or is equal to another.


bool IsBeforeOrEqualTo(this string lhs, string rhs, StringComparison comparisonType)

Parameters

Example

string a = "A";
string b = "B";
bool result = a.IsBeforeOrEqualTo(b, StringComparison.OrdinalIgnoreCase); // true

See also