[#BloombergLP-bdlb-PrintMethods-print-06a]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::xref:BloombergLP/bdlb/PrintMethods.adoc[PrintMethods]::print
:relfileprefix: ../../../
:mrdocs:

Format the specified `object` to the specified output `stream` at the (absolute value of) the optionally specified indentation `level` and return a reference to stream&period; Note that output will be formatted on one line&period; If `stream` is not valid on entry, this operation has no effect&period;

== Synopsis

Declared in `&lt;bdlb&lowbar;printmethods&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class CHAR&lowbar;T,
    class CHAR&lowbar;TRAITS&lowbar;T,
    class ALLOC&gt;
std::ostream&
print(
    std::ostream& stream,
    xref:bsl/basic_string-0faf.adoc[bsl::basic&lowbar;string&lt;CHAR&lowbar;T, CHAR&lowbar;TRAITS&lowbar;T, ALLOC&gt;] const& object,
    int level = 0,
    int spacesPerLevel = 4);
----


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