BloombergLP::bdlbb::BlobUtil::compare

Compare the data stored by two blobs lexicographically.

Synopsis

Declared in <bdlbb_blobutil.h>

static
int
compare(
    Blob const& a,
    Blob const& b);

Description

Compare, lexicographically, the data (data length and character data values at each index position) stored by the specified a and b blobs. Return 0 if the data stored by a is lexicographically equal to the data stored by b, a negative value if a is lexicographically less than b, and a positive value if a is lexicographically greater than b.

Return Value

0 if equal, a negative value if a is less than b, and a positive value if a is greater than b

Parameters

NameDescription
afirst blob
bsecond blob