A sequence of characters stored as a tree of buffers.
Synopsis
Declared in <absl/strings/cord.h>
class Cord;
Types
Name |
Description |
Iterates over the constituent characters of a |
|
A range over the characters of a |
|
Iterates over the constituent chunks of a |
|
A range over the chunks of a |
Member Functions
Name |
Description |
|
Constructors |
|
Destructs the Cord. |
Assignment operators |
|
|
|
Returns a |
|
Returns a |
|
Releases the Cord data. |
|
|
|
|
|
|
|
Returns the approximate number of bytes held by this cord. |
|
Returns this cord's expected checksum, if it has one. Otherwise, returns nullopt. |
|
|
|
Flattens the cord into a single array and returns a view of the data. |
|
Returns a CordBuffer, re‐using potential existing capacity in this cord. |
|
Returns a CordBuffer, re‐using potential existing capacity in this cord. |
|
|
|
Removes the first |
|
Removes the last |
|
Stores a checksum value with this non‐empty cord instance, for later retrieval. |
|
|
|
Returns a new Cord representing the subrange [pos, pos + new_size) of] *this. |
|
If this cord's representation is a single flat array, returns a string_view referencing that array. Otherwise returns nullopt. |
|
Returns an iterator to the first character of the |
|
Returns an iterator to one past the last character of the |
|
Returns an iterator to the first chunk of the |
|
Returns an iterator one increment past the last chunk of the |
|
Determines whether the given Cord is empty, returning |
|
Gets the "i"th character of the Cord and returns it, provided that 0 <= i < Cord.size(). |
|
Returns the size of the Cord. |
|
Swaps the contents of the Cord with |
|
Converts a Cord into a |
Static Member Functions
Name |
Description |
Advances the |
|
Advances the |
|
Returns the longest contiguous view starting at the iterator's position. |
|
Returns the distance between |
Friends
Name |
Description |
|
|
Compares |
|
Returns the internal Cordz sampling info for |
|
Three‐way compares string data with a Cord. |
|
Three‐way compares a Cord with string data. |
|
Three‐way compares two Cords. |
|
Compares a Cord with string data for equality. |
|
Compares two Cords for equality. |
|
Test‐only accessor granting access to |
|
|
|
Combines the Cord's contents into a hash state. |
|
Supports automatic stringification with absl::StrCat and absl::StrFormat. |
|
Supports absl::Cord as a sink object for absl::Format(). |
|
Copies up to |
|
Appends the contents of a |
|
Copies the contents of a |
|
Swaps the contents of two Cords. |
|
Creates a Cord that takes ownership of external string memory. |
Non-Member Functions
Name |
Description |
Compares two Cords for inequality. |
|
Compares a Cord with string data for inequality. |
|
Orders one Cord before another. |
|
Orders a Cord before string data. |
|
Tests whether a Cord is ordered at or before string data. |
|
Tests whether one Cord is ordered at or before another. |
|
Orders one Cord after another. |
|
Orders a Cord after string data. |
|
Tests whether one Cord is ordered at or after another. |
|
Tests whether a Cord is ordered at or after string data. |
Created with MrDocs