Copies the contents of a src Cord into a *dst string.
Declared in <absl/strings/cord.h>
void
CopyCordToString(
Cord const& src,
std::string* dst);
This function optimizes the case of reusing the destination string since it can reuse previously allocated capacity. However, this function does not guarantee that pointers previously returned by dst->data() remain valid even if *dst had enough capacity to hold src. If *dst is a new object, prefer to simply use the conversion operator to std::string.
| Name | Description |
|---|---|
| src | The Cord whose contents are copied. |
| dst | The string that receives the copied contents. |