[#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. == Synopsis Declared in `<bdlb_bitstringutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static std::ostream& print( std::ostream& stream, uint64_t const* bitString, std::size_t numBits, int level = 1, int spacesPerLevel = 4); ---- == Description Format to the specified output `stream` the specified low‐order `numBits` in the specified `bitString` in hexadecimal, and return a reference to `stream`. The highest order bits are printed first, in groups of 16 nibbles, 64 nibbles per line (in the case of multi‐line output). Optionally specify `level`, the indentation level for each line output. Optionally specify `spacesPerLevel`, the number of spaces per indentation level. Each line is indented by the absolute value of `level * spacesPerLevel`. If `spacesPerLevel` is negative, suppress line breaks and format the entire output on one line. If `stream` is initially invalid, this operation has no effect. Note that a trailing newline is provided in multiline mode only. == 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‐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]#