EndsWith()

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

Determines if a ReadOnlySpan ends with a single value.

template<typename T> bool System::MemoryExtensions::EndsWith(const ReadOnlySpan<T> &span, const T &value)

Template parameters

ParameterDescription
TThe type of elements in the span

Arguments

ParameterTypeDescription
spanconst ReadOnlySpan<T>&The span to check
valueconst T&The value to check for at the end of the span

Return Value

true if the span ends with the value, false otherwise

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

Determines if a ReadOnlySpan ends with another ReadOnlySpan

template<typename T> bool System::MemoryExtensions::EndsWith(const ReadOnlySpan<T> &span, const ReadOnlySpan<T> &value)

Template parameters

ParameterDescription
TThe type of elements in the spans

Arguments

ParameterTypeDescription
spanconst ReadOnlySpan<T>&The span to check
valueconst ReadOnlySpan<T>&The span to check for at the end of the target span

Return Value

true if the span ends with the value span, false otherwise

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

Determines if a Span ends with a ReadOnlySpan

template<typename T> bool System::MemoryExtensions::EndsWith(const Span<T> &span, const ReadOnlySpan<T> &value)

Template parameters

ParameterDescription
TThe type of elements in the spans

Arguments

ParameterTypeDescription
spanconst Span<T>&The span to check
valueconst ReadOnlySpan<T>&The span to check for at the end of the target span

Return Value

true if the span ends with the value span, false otherwise

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

Determines if a ReadOnlySpan ends with a Span

template<typename T> bool System::MemoryExtensions::EndsWith(const ReadOnlySpan<T> &span, const Span<T> &value)

Template parameters

ParameterDescription
TThe type of elements in the spans

Arguments

ParameterTypeDescription
spanconst ReadOnlySpan<T>&The span to check
valueconst Span<T>&The span to check for at the end of the target span

Return Value

true if the span ends with the value span, false otherwise

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

Determines if a Span ends with another Span

template<typename T> bool System::MemoryExtensions::EndsWith(const Span<T> &span, const Span<T> &value)

Template parameters

ParameterDescription
TThe type of elements in the spans

Arguments

ParameterTypeDescription
spanconst Span<T>&The span to check
valueconst Span<T>&The span to check for at the end of the target span

Return Value

true if the span ends with the value span, false otherwise

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

Determines if a ReadOnlySpan<char16_t> ends with the specified value using StringComparison.

bool System::MemoryExtensions::EndsWith(const ReadOnlySpan<char16_t> &span, const ReadOnlySpan<char16_t> &value, StringComparison comparisonType)

Arguments

ParameterTypeDescription
spanconst ReadOnlySpan<char16_t>&The span to check
valueconst ReadOnlySpan<char16_t>&The value to check for at the end of the span
comparisonTypeStringComparisonThe string comparison type to use

Return Value

true if the span ends with the value, false otherwise

See Also