A range over the chunks of a Cord, usable in a range‐based for loop.

Synopsis

Declared in <absl/strings/cord.h>

class ChunkRange;

Description

ChunkRange is a helper class for iterating over the chunks of the Cord, producing an iterator which can be used within a range‐based for loop. Construction of a ChunkRange will return an iterator pointing to the first chunk of the Cord. Generally, do not construct a ChunkRange directly; instead, prefer to use the Cord::Chunks() method.

Implementation note: ChunkRange is simply a convenience wrapper over Cord::chunk_begin() and Cord::chunk_end().

Type Aliases

Name

Description

const_iterator

The const iterator type for the range.

const_reference

The const reference type for the values in the range.

iterator

The iterator type for the range.

reference

The reference type for the values in the range.

value_type

The type of the values in the range.

Member Functions

Name

Description

ChunkRange [constructor]

Constructs a range over the chunks of cord.

begin

Returns an iterator to the first chunk of the range.

end

Returns an iterator one past the last chunk of the range.

Created with MrDocs