[#BloombergLP-bslim-TestUtil-compareText]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslim.adoc[bslim]::xref:BloombergLP/bslim/TestUtil.adoc[TestUtil]::compareText
:relfileprefix: ../../../
:mrdocs:

Return whether two text strings have the same value&period;

== Synopsis

Declared in `&lt;bslim&lowbar;testutil&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
bool
compareText(
    xref:BloombergLP/bslstl/StringRef.adoc[bslstl::StringRef] lhs,
    xref:BloombergLP/bslstl/StringRef.adoc[bslstl::StringRef] rhs,
    std::ostream& errorStream = bsl&colon;&colon;cout);
----

== Description

Return `true` if the specified `lhs` has the same value as the specified `rhs`, and `false` otherwise&period; Optionally specify an `errorStream` on which, if `lhs` and `rhs` are not the same, a description of how the two strings differ will be written&period; If `errorStream` is not supplied, `stdout` is used&period;

== Return Value

`true` if `lhs` and `rhs` have the same value, and `false` otherwise

== Parameters

[cols="1,4"]
|===
| Name| Description
| *lhs*
| left&hyphen;hand string to compare
| *rhs*
| right&hyphen;hand string to compare
| *errorStream*
| stream for difference description&semi; defaults to `bsl&colon;&colon;cout`
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
