ardalis / GuardClauses

A simple package with guard clause extensions.
MIT License
3.06k stars 270 forks source link

StringToLong #331

Closed Maarkis closed 9 months ago

Maarkis commented 9 months ago

This PR includes the implementation of the StringTooLong extension method on the IGuardClause interface. This method checks whether a provided string exceeds a specified maximum length. If the string is longer than the allowed maximum, the method throws an ArgumentException. Otherwise, it returns the original string.

325