[#BloombergLP-bdlbb-BlobUtil-compare] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlbb.adoc[bdlbb]::xref:BloombergLP/bdlbb/BlobUtil.adoc[BlobUtil]::compare :relfileprefix: ../../../ :mrdocs: Compare the data stored by two blobs lexicographically. == Synopsis Declared in `<bdlbb_blobutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int compare( xref:BloombergLP/bdlbb/Blob.adoc[Blob] const& a, xref:BloombergLP/bdlbb/Blob.adoc[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 [cols="1,4"] |=== | Name| Description | *a* | first blob | *b* | second blob |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#