Table of Contents

Method TrimEnd

Namespace
Zyl.ExSpans
Assembly
ExSpans.dll

TrimEnd<T>(ExSpan<T>, T)

Removes all trailing occurrences of a specified element from the span.

public static ExSpan<T> TrimEnd<T>(this ExSpan<T> span, T trimElement) where T : IEquatable<T>?

Parameters

span ExSpan<T>

The source span from which the element is removed.

trimElement T

The specified element to look for and remove.

Returns

ExSpan<T>

Type Parameters

T

TrimEnd<T>(ReadOnlyExSpan<T>, T)

Removes all trailing occurrences of a specified element from the span.

public static ReadOnlyExSpan<T> TrimEnd<T>(this ReadOnlyExSpan<T> span, T trimElement) where T : IEquatable<T>?

Parameters

span ReadOnlyExSpan<T>

The source span from which the element is removed.

trimElement T

The specified element to look for and remove.

Returns

ReadOnlyExSpan<T>

Type Parameters

T

TrimEnd<T>(ExSpan<T>, ReadOnlyExSpan<T>)

Removes all trailing occurrences of a set of elements specified in a readonly span from the span.

public static ExSpan<T> TrimEnd<T>(this ExSpan<T> span, ReadOnlyExSpan<T> trimElements) where T : IEquatable<T>?

Parameters

span ExSpan<T>

The source span from which the elements are removed.

trimElements ReadOnlyExSpan<T>

The span which contains the set of elements to remove.

Returns

ExSpan<T>

Type Parameters

T

Remarks

If trimElements is empty, the span is returned unaltered.

TrimEnd<T>(ReadOnlyExSpan<T>, ReadOnlyExSpan<T>)

Removes all trailing occurrences of a set of elements specified in a readonly span from the span.

public static ReadOnlyExSpan<T> TrimEnd<T>(this ReadOnlyExSpan<T> span, ReadOnlyExSpan<T> trimElements) where T : IEquatable<T>?

Parameters

span ReadOnlyExSpan<T>

The source span from which the elements are removed.

trimElements ReadOnlyExSpan<T>

The span which contains the set of elements to remove.

Returns

ReadOnlyExSpan<T>

Type Parameters

T

Remarks

If trimElements is empty, the span is returned unaltered.

TrimEnd(ReadOnlyExSpan<char>)

Removes all trailing white-space characters from the span.

public static ReadOnlyExSpan<char> TrimEnd(this ReadOnlyExSpan<char> span)

Parameters

span ReadOnlyExSpan<char>

The source span from which the characters are removed.

Returns

ReadOnlyExSpan<char>

TrimEnd(ReadOnlyExSpan<char>, char)

Removes all trailing occurrences of a specified character from the span.

public static ReadOnlyExSpan<char> TrimEnd(this ReadOnlyExSpan<char> span, char trimChar)

Parameters

span ReadOnlyExSpan<char>

The source span from which the character is removed.

trimChar char

The specified character to look for and remove.

Returns

ReadOnlyExSpan<char>

TrimEnd(ReadOnlyExSpan<char>, ReadOnlyExSpan<char>)

Removes all trailing occurrences of a set of characters specified in a readonly span from the span.

public static ReadOnlyExSpan<char> TrimEnd(this ReadOnlyExSpan<char> span, ReadOnlyExSpan<char> trimChars)

Parameters

span ReadOnlyExSpan<char>

The source span from which the characters are removed.

trimChars ReadOnlyExSpan<char>

The span which contains the set of characters to remove.

Returns

ReadOnlyExSpan<char>

Remarks

If trimChars is empty, white-space characters are removed instead.

TrimEnd(ExSpan<char>)

Removes all trailing white-space characters from the span.

public static ExSpan<char> TrimEnd(this ExSpan<char> span)

Parameters

span ExSpan<char>

The source span from which the characters are removed.

Returns

ExSpan<char>