[#BloombergLP-bsls-OutputRedirector-compare-0c] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bsls.adoc[bsls]::xref:BloombergLP/bsls/OutputRedirector.adoc[OutputRedirector]::compare :relfileprefix: ../../../ :mrdocs: `compare` overloads == Synopses Declared in `<bsls_outputredirector.h>` Compare the scratch buffer to the specified expected NTBS. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- int xref:BloombergLP/bsls/OutputRedirector/compare-0eb.adoc[compare](char const* expected) const; ---- [.small]#xref:BloombergLP/bsls/OutputRedirector/compare-0eb.adoc[_» more..._]# Compare the scratch buffer to the specified expected buffer. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- int xref:BloombergLP/bsls/OutputRedirector/compare-0e8.adoc[compare]( char const* expected, size_t expectedLength) const; ---- [.small]#xref:BloombergLP/bsls/OutputRedirector/compare-0e8.adoc[_» more..._]# == Return Value 0 if the buffers match; non‐zero otherwise == Parameters [cols="1,4"] |=== | Name| Description | *expected* | null‐terminated string to compare against the scratch buffer | *expectedLength* | length of the `expected` buffer in bytes |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#