absl::Cord::chunk_begin

Returns an iterator to the first chunk of the Cord.

Synopsis

Declared in <absl/strings/cord.h>

Cord::ChunkIterator
chunk_begin() const;

Description

Generally, prefer using Cord::Chunks() within a range-based for loop for iterating over the chunks of a Cord. This method may be useful for getting a ChunkIterator where range-based for-loops are not useful.

Example:

absl::Cord::ChunkIterator FindAsChunk(const absl::Cord& c, absl::string_view s) { return std::find(c.chunk_begin(), c.chunk_end(), s); }

Return Value

An iterator to the first chunk of the Cord.