Home   Manual   Type Index   Symbol Index   Topics Index

std::range

returns a subrange of a collection

Description

The first argument specifies the collection.

The second argument specifies the first index of the first item to include in the subrange.

The third argument specifies the last index of the first item to include in the subrange.

It is okay if the subrange is empty:

first_index == last_index + 1

It is an error if the size of the subrange would be negative:

first_index > last_index + 1

If an index is negativ it is counted from the end of the collection.

So -1 denotes the last item of the collection, -2 denotes the next-to-last item and so on.

Implemented by

std_types::list  as  std_types::list/std::range
std_types::octet_string  as  std_types::octet_string/std::range

Topics

Strings
Lists