[#absl-Cord-Chunks] = xref:absl.adoc[absl]::xref:absl/Cord.adoc[Cord]::Chunks :relfileprefix: ../../ :mrdocs: Returns a `Cord::ChunkRange` for iterating over the chunks of a `Cord` with a range‐based for‐loop. == Synopsis Declared in `<absl/strings/cord.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:absl/Cord/ChunkRange.adoc[Cord::ChunkRange] Chunks() const; ---- == Description For most iteration tasks on a Cord, use `Cord::Chunks()` to retrieve this iterator. Example: void ProcessChunks(const Cord& cord) { for (absl::string_view chunk : cord.Chunks()) { ... } } Note that the ordinary caveats of temporary lifetime extension apply: void Process() { for (absl::string_view chunk : CordFactory().Chunks()) { // The temporary Cord returned by CordFactory has been destroyed! } } == Return Value A range over the chunks of the Cord. [.small]#Created with https://www.mrdocs.com[MrDocs]#