absl::Cord::Compare

Compares 'this' Cord with rhs.

Synopsis

Declared in <absl/strings/cord.h>

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

NameDescription
rhsThe string data to compare against.