[#bsl-basic_stringbuf-2constructor-01f]
= xref:bsl.adoc[bsl]::xref:bsl/basic_stringbuf.adoc[basic&lowbar;stringbuf]::basic&lowbar;stringbuf
:relfileprefix: ../../
:mrdocs:

Create a `basic&lowbar;stringbuf` by moving from `initialString`&period;

== Synopsis

Declared in `&lt;bslstl&lowbar;stringbuf&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
basic&lowbar;stringbuf(
    xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef&lt;StringType&gt;] initialString,
    std::ios&lowbar;base::openmode modeBitMask,
    xref:bsl/basic_stringbuf/allocator_type.adoc[allocator&lowbar;type] const& allocator);
----

== Description

Create a `basic&lowbar;stringbuf` object&period; Use the specified `initialString` indicating the initial sequence of characters that this buffer will access or manipulate&period; Optionally specify a `modeBitMask` indicating whether this buffer may be read from, written to, or both&period; If `modeBitMask` is not supplied, this buffer is created with `ios&lowbar;base&colon;&colon;in &verbar; ios&lowbar;base&colon;&colon;out`&period; Optionally specify the `allocator` used to supply memory&period; `initialString` is left in a valid but unspecified state&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *initialString*
| initial character sequence moved into the buffer
| *modeBitMask*
| open mode for the stream buffer
| *allocator*
| allocator used to supply memory
|===


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