[#bsl-basic_stringbuf-2constructor-0c6] = xref:bsl.adoc[bsl]::xref:bsl/basic_stringbuf.adoc[basic_stringbuf]::basic_stringbuf :relfileprefix: ../../ :mrdocs: Create a `basic_stringbuf` object. Optionally specify a `modeBitMask` indicating whether this buffer may be read from, written to, or both. If `modeBitMask` is not supplied, this buffer is created with `ios_base::in | ios_base::out`. Optionally specify an `initialString` indicating the initial sequence of characters that this buffer will access or manipulate. If `initialString` is not supplied, the initial sequence of characters will be empty. Optionally specify the `allocator` used to supply memory. If `allocator` is not supplied, a default‐constructed object of the (template parameter) `ALLOCATOR` type is used. If the `ALLOCATOR` argument is of type `bsl::allocator` (the default), then `allocator`, if supplied, shall be convertible to `bslma::Allocator *`. If the `ALLOCATOR` argument is of type `bsl::allocator` and `allocator` is not supplied, the currently installed default allocator will be used to supply memory. == Synopsis Declared in `<bslstl_stringbuf.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit basic_stringbuf(xref:bsl/basic_stringbuf/allocator_type.adoc[allocator_type] const& allocator = allocator_type()); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#