Closed feO2x closed 1 year ago
We should add the following assertions for string, ReadOnlySpan<char> and Span<char>:
string
ReadOnlySpan<char>
Span<char>
IsTrimmed
MustBeTrimmed
StringException
IsTrimmedAtStart
MustBeTrimmedAtStart
IsTrimmedAtEnd
MustBeTrimmedAtEnd
We can leave out the Span<T> overloads because there is an implicit conversion from Span<T> to ReadOnlySpan<T>.
Span<T>
ReadOnlySpan<T>
We should add the following assertions for
string
,ReadOnlySpan<char>
andSpan<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
.