[#bsl-bitset-to_string] = xref:bsl.adoc[bsl]::xref:bsl/bitset.adoc[bitset]::to_string :relfileprefix: ../../ :mrdocs: Return a string representation of this bitset using `zero` and `one`. == Synopsis Declared in `<bslstl_bitset.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class CHAR_TYPE = char, class TRAITS = char_traits<CHAR_TYPE>, class ALLOCATOR = xref:bsl/allocator-0df.adoc[allocator<CHAR_TYPE>]> xref:bsl/basic_string-0faf.adoc[basic_string<CHAR_TYPE, TRAITS, ALLOCATOR>] to_string( CHAR_TYPE zero = CHAR_TYPE('0'), CHAR_TYPE one = CHAR_TYPE('1')) const; ---- == Description Return a `basic_string` representation of this bitset, where the zero‐bits are represented by the specified `zero` character and the one‐bits are represented by the specified `one` character. The most‐significant bit is placed at the beginning of the string, and the least‐significant bit is placed at the end of the string. == Return Value string representation of this bitset == Parameters [cols="1,4"] |=== | Name| Description | *zero* | character representing an unset bit (default '0') | *one* | character representing a set bit (default '1') |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#