[#BloombergLP-bslstl-StringRefImp-0a-compare] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::xref:BloombergLP/bslstl/StringRefImp-0a.adoc[StringRefImp<wchar_t>]::compare :relfileprefix: ../../../ :mrdocs: Compare this and the specified `other` string objects using a lexicographical comparison and return a negative value if this string is less than `other` string, a positive value if this string is greater than `other` string, and 0 if this string is equal to `other` string. == Synopsis Declared in `<bslstl_stringref.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- int compare(xref:BloombergLP/bslstl/StringRefImp-0c.adoc[StringRefImp<wchar_t>] const& other) const; ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#