Light.GuardClauses
Light.GuardClauses copied to clipboard
Add string assertion "MustBeTrimmed"
We should add the following assertions for string, ReadOnlySpan<char> and Span<char>:
-
IsTrimmed: checks if a character sequence starts and ends with a non-whitespace character, returns true or false. -
MustBeTrimmed: same asIsTrimmed, but throws aStringException. -
IsTrimmedAtStart: checks if a character sequence starts with a non-whitespace character, returns true or false. -
MustBeTrimmedAtStart: same asIsTrimmedAtStart, but throws aStringException. -
IsTrimmedAtEnd: checks if a character sequence ends with a non-whitespace character, returns true or false. -
MustBeTrimmedAtEnd: same asIsTrimmedAtEnd, but throws aStringException.