Count()
Contents
[
Hide
]System::MemoryExtensions::Count(const ReadOnlySpan<T>&, const T&) function
Counts occurrences of a value in a read-only span.
template<typename T> int32_t System::MemoryExtensions::Count(const ReadOnlySpan<T> &span, const T &value)
Template parameters
| Parameter | Description |
|---|---|
| T | The type of elements in the span |
Arguments
| Parameter | Type | Description |
|---|---|---|
| span | const ReadOnlySpan<T>& | The span to search in |
| value | const T& | The value to count |
Return Value
The number of times value appears in span
System::MemoryExtensions::Count(const ReadOnlySpan<T>&, const ReadOnlySpan<T>&) function
Counts occurrences of a span within another read-only span.
template<typename T> int32_t System::MemoryExtensions::Count(const ReadOnlySpan<T> &span, const ReadOnlySpan<T> &value)
Template parameters
| Parameter | Description |
|---|---|
| T | The type of elements in the spans |
Arguments
| Parameter | Type | Description |
|---|---|---|
| span | const ReadOnlySpan<T>& | The span to search in |
| value | const ReadOnlySpan<T>& | The span to count occurrences of |
Return Value
The number of times value appears in span
System::MemoryExtensions::Count(const Span<T>&, const T&) function
Counts occurrences of a single value in a Span
template<typename T> int32_t System::MemoryExtensions::Count(const Span<T> &span, const T &value)
Template parameters
| Parameter | Description |
|---|---|
| T | The type of elements in the span |
Arguments
| Parameter | Type | Description |
|---|---|---|
| span | const Span<T>& | The span to search in |
| value | const T& | The value to count occurrences of |
Return Value
The number of occurrences of the value in the span
System::MemoryExtensions::Count(const Span<T>&, const ReadOnlySpan<T>&) function
Counts occurrences of a ReadOnlySpan
template<typename T> int32_t System::MemoryExtensions::Count(const Span<T> &span, const ReadOnlySpan<T> &value)
Template parameters
| Parameter | Description |
|---|---|
| T | The type of elements in the spans |
Arguments
| Parameter | Type | Description |
|---|---|---|
| span | const Span<T>& | The span to search in |
| value | const ReadOnlySpan<T>& | The span containing values to count occurrences of |
Return Value
The number of occurrences of the value span in the target span
See Also
- Class ReadOnlySpan
- Class Span
- Namespace System::MemoryExtensions
- Library Aspose.Slides