absl::Cord::CharRange

A range over the characters of a Cord, usable in a range-based for loop.

Synopsis

Declared in <absl/strings/cord.h>

class CharRange;

Description

CharRange is a helper class for iterating over the characters of a producing an iterator which can be used within a range-based for loop. Construction of a CharRange will return an iterator pointing to the first character of the Cord. Generally, do not construct a CharRange directly; instead, prefer to use the Cord::Chars() method shown below.

Implementation note: CharRange is simply a convenience wrapper over Cord::char_begin() and Cord::char_end().

Type Aliases

NameDescription
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

NameDescription
CharRange [constructor]Constructs a range over the characters of cord.
begin Returns an iterator to the first character of the range.
end Returns an iterator one past the last character of the range.