[#BloombergLP-bdlb-BitStringUtil-print]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::xref:BloombergLP/bdlb/BitStringUtil.adoc[BitStringUtil]::print
:relfileprefix: ../../../
:mrdocs:

Format a bit string to an output stream in hexadecimal&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
std::ostream&
print(
    std::ostream& stream,
    uint64&lowbar;t const* bitString,
    std::size&lowbar;t numBits,
    int level = 1,
    int spacesPerLevel = 4);
----

== Description

Format to the specified output `stream` the specified low&hyphen;order `numBits` in the specified `bitString` in hexadecimal, and return a reference to `stream`&period; The highest order bits are printed first, in groups of 16 nibbles, 64 nibbles per line (in the case of multi&hyphen;line output)&period; Optionally specify `level`, the indentation level for each line output&period; Optionally specify `spacesPerLevel`, the number of spaces per indentation level&period; Each line is indented by the absolute value of `level &ast; spacesPerLevel`&period; If `spacesPerLevel` is negative, suppress line breaks and format the entire output on one line&period; If `stream` is initially invalid, this operation has no effect&period; Note that a trailing newline is provided in multiline mode only&period;

== Return Value

a reference to `stream`

== Parameters

[cols="1,4"]
|===
| Name| Description
| *stream*
| output stream to which to write
| *bitString*
| bit string to format
| *numBits*
| number of low&hyphen;order bits to format
| *level*
| indentation level for each line
| *spacesPerLevel*
| number of spaces per indentation level
|===


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