[#absl-Cord-Compare-028] = xref:absl.adoc[absl]::xref:absl/Cord.adoc[Cord]::Compare :relfileprefix: ../../ :mrdocs: Compares 'this' Cord with rhs. == Synopsis Declared in `<absl/strings/cord.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- int Compare(std::string_view rhs) const; ---- == Description This function and its relatives treat Cords as sequences of unsigned bytes. The comparison is a straightforward lexicographic comparison. `Cord::Compare()` returns values as follows: ‐1 'this' Cord is smaller 0 two Cords are equal 1 'this' Cord is larger == Return Value ‐1, 0, or 1 as described above. == Parameters [cols="1,4"] |=== | Name| Description | *rhs* | The string data to compare against. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#