TrimEnd()

System::MemoryExtensions::TrimEnd(const ReadOnlySpan<T>&, const T&) function

Trims specified element from the end of a typed span.

template<typename T> ReadOnlySpan<T> System::MemoryExtensions::TrimEnd(const ReadOnlySpan<T> &span, const T &trimElement)

Template parameters

ParameterDescription
TThe type of elements in the span

Arguments

ParameterTypeDescription
spanconst ReadOnlySpan<T>&The span to trim
trimElementconst T&The element to trim

Return Value

A new span with the specified element trimmed from the end

System::MemoryExtensions::TrimEnd(Span<T>&, const T&) function

Trims specified element from the end of a mutable typed span.

template<typename T> Span<T> System::MemoryExtensions::TrimEnd(Span<T> &span, const T &trimElement)

Template parameters

ParameterDescription
TThe type of elements in the span

Arguments

ParameterTypeDescription
spanSpan<T>&The mutable span to trim
trimElementconst T&The element to trim

Return Value

A new span with the specified element trimmed from the end

System::MemoryExtensions::TrimEnd(const ReadOnlySpan<T>&, const ReadOnlySpan<T>&) function

Trims specified elements from the end of a typed span.

template<typename T> ReadOnlySpan<T> System::MemoryExtensions::TrimEnd(const ReadOnlySpan<T> &span, const ReadOnlySpan<T> &trimElements)

Template parameters

ParameterDescription
TThe type of elements in the span

Arguments

ParameterTypeDescription
spanconst ReadOnlySpan<T>&The span to trim
trimElementsconst ReadOnlySpan<T>&The elements to trim

Return Value

A new span with the specified elements trimmed from the end

System::MemoryExtensions::TrimEnd(Span<T>&, const ReadOnlySpan<T>&) function

Trims specified elements from the end of a mutable typed span.

template<typename T> Span<T> System::MemoryExtensions::TrimEnd(Span<T> &span, const ReadOnlySpan<T> &trimElements)

Template parameters

ParameterDescription
TThe type of elements in the span

Arguments

ParameterTypeDescription
spanSpan<T>&The mutable span to trim
trimElementsconst ReadOnlySpan<T>&The elements to trim

Return Value

A new span with the specified elements trimmed from the end

System::MemoryExtensions::TrimEnd(const ReadOnlySpan<char16_t>&) function

Trims whitespace characters from the end of a character span.

ReadOnlySpan<char16_t> System::MemoryExtensions::TrimEnd(const ReadOnlySpan<char16_t> &span)

Arguments

ParameterTypeDescription
spanconst ReadOnlySpan<char16_t>&The character span to trim

Return Value

A new span with whitespace trimmed from the end

System::MemoryExtensions::TrimEnd(Span<char16_t>&) function

Trims whitespace characters from the end of a mutable character span.

Span<char16_t> System::MemoryExtensions::TrimEnd(Span<char16_t> &span)

Arguments

ParameterTypeDescription
spanSpan<char16_t>&The mutable character span to trim

Return Value

A new span with whitespace trimmed from the end

System::MemoryExtensions::TrimEnd(const ReadOnlySpan<char16_t>&, char16_t) function

Trims specified character from the end of a character span.

ReadOnlySpan<char16_t> System::MemoryExtensions::TrimEnd(const ReadOnlySpan<char16_t> &span, char16_t trimchar)

Arguments

ParameterTypeDescription
spanconst ReadOnlySpan<char16_t>&The character span to trim
trimcharchar16_tThe character to trim

Return Value

A new span with the specified character trimmed from the end

System::MemoryExtensions::TrimEnd(Span<char16_t>&, char16_t) function

Trims specified character from the end of a mutable character span.

Span<char16_t> System::MemoryExtensions::TrimEnd(Span<char16_t> &span, char16_t trimchar)

Arguments

ParameterTypeDescription
spanSpan<char16_t>&The mutable character span to trim
trimcharchar16_tThe character to trim

Return Value

A new span with the specified character trimmed from the end

System::MemoryExtensions::TrimEnd(const ReadOnlySpan<char16_t>&, const ReadOnlySpan<char16_t>&) function

Trims specified characters from the end of a character span.

ReadOnlySpan<char16_t> System::MemoryExtensions::TrimEnd(const ReadOnlySpan<char16_t> &span, const ReadOnlySpan<char16_t> &trimChars)

Arguments

ParameterTypeDescription
spanconst ReadOnlySpan<char16_t>&The character span to trim
trimCharsconst ReadOnlySpan<char16_t>&The characters to trim

Return Value

A new span with the specified characters trimmed from the end

System::MemoryExtensions::TrimEnd(Span<char16_t>&, const ReadOnlySpan<char16_t>&) function

Trims specified characters from the end of a mutable character span.

Span<char16_t> System::MemoryExtensions::TrimEnd(Span<char16_t> &span, const ReadOnlySpan<char16_t> &trimchars)

Arguments

ParameterTypeDescription
spanSpan<char16_t>&The mutable character span to trim
trimcharsconst ReadOnlySpan<char16_t>&The characters to trim

Return Value

A new span with the specified characters trimmed from the end

See Also