[#bsl-StringBufContainer-2constructor-0f]
= xref:bsl.adoc[bsl]::xref:bsl/StringBufContainer.adoc[StringBufContainer]::StringBufContainer
:relfileprefix: ../../
:mrdocs:

Constructors

== Synopses

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

Create a `StringBufContainer` object having the same value as the specified `original` object by moving the contents of `original` to the newly&hyphen;created object&period; `original` is left in a valid but unspecified state&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/StringBufContainer/2constructor-08.adoc[StringBufContainer](xref:bsl/StringBufContainer.adoc[StringBufContainer]&& original);
----

[.small]#xref:bsl/StringBufContainer/2constructor-08.adoc[_» more&period;&period;&period;_]#

Create a `StringBufContainer` object using the specified `allocator` to supply memory&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:bsl/StringBufContainer/2constructor-05.adoc[StringBufContainer](ALLOCATOR const& allocator);
----

[.small]#xref:bsl/StringBufContainer/2constructor-05.adoc[_» more&period;&period;&period;_]#

Create a `StringBufContainer` object using the specified `modeBitMask` and `allocator`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/StringBufContainer/2constructor-0a87.adoc[StringBufContainer](
    std::ios&lowbar;base::openmode modeBitMask,
    ALLOCATOR const& allocator);
----

[.small]#xref:bsl/StringBufContainer/2constructor-0a87.adoc[_» more&period;&period;&period;_]#

Same as the constructor taking `MovableRef&lt;StringType&gt;`, `ios&lowbar;base&colon;&colon;openmode`, and `ALLOCATOR`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/StringBufContainer/2constructor-096.adoc[StringBufContainer](
    xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef&lt;StringType&gt;] initialString,
    std::ios&lowbar;base::openmode modeBitMask);
----

[.small]#xref:bsl/StringBufContainer/2constructor-096.adoc[_» more&period;&period;&period;_]#

Create a `StringBufContainer` object initialized with the specified `initialString` and `allocator`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/StringBufContainer/2constructor-0e.adoc[StringBufContainer](
    xref:bsl/StringBufContainer.adoc[StringType] const& initialString,
    ALLOCATOR const& allocator);
----

[.small]#xref:bsl/StringBufContainer/2constructor-0e.adoc[_» more&period;&period;&period;_]#

Create a `StringBufContainer` object using the specified `allocator` to supply memory and having the same value as the specified `original` object by moving the contents of `original` to the newly&hyphen;created object&period; `original` is left in a valid but unspecified state&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/StringBufContainer/2constructor-0cc.adoc[StringBufContainer](
    xref:bsl/StringBufContainer.adoc[StringBufContainer]&& original,
    ALLOCATOR const& allocator);
----

[.small]#xref:bsl/StringBufContainer/2constructor-0cc.adoc[_» more&period;&period;&period;_]#

Create a `StringBufContainer` object&period; Use the specified `initialString` (of a type convertible to `basic&lowbar;string&lowbar;view&lt;CHAR&lowbar;TYPE, CHAR&lowbar;TRAITS&gt;` but not to `const CHAR&lowbar;TYPE &ast;`) indicating the initial sequence of characters that this buffer will access or manipulate&period; Use the specified `modeBitMask` to indicate whether this buffer may be read from, written to, or both&period; Use the specified `allocator` to supply memory&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class STRING&lowbar;VIEW&lowbar;LIKE&lowbar;TYPE&gt;
xref:bsl/StringBufContainer/2constructor-0a8a.adoc[StringBufContainer](
    STRING&lowbar;VIEW&lowbar;LIKE&lowbar;TYPE const& initialString,
    std::ios&lowbar;base::openmode modeBitMask);
----

[.small]#xref:bsl/StringBufContainer/2constructor-0a8a.adoc[_» more&period;&period;&period;_]#

Create a `StringBufContainer` object initialized from the specified `initialString` and `modeBitMask`, using the allocator in `initialString` to supply memory&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/StringBufContainer/2constructor-098.adoc[StringBufContainer](
    xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef&lt;StringType&gt;] initialString,
    std::ios&lowbar;base::openmode modeBitMask,
    ALLOCATOR const& allocator);
----

[.small]#xref:bsl/StringBufContainer/2constructor-098.adoc[_» more&period;&period;&period;_]#

Create a `StringBufContainer` object initialized with the specified `initialString`, `modeBitMask`, and `allocator`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/StringBufContainer/2constructor-0c8.adoc[StringBufContainer](
    xref:bsl/StringBufContainer.adoc[StringType] const& initialString,
    std::ios&lowbar;base::openmode modeBitMask,
    ALLOCATOR const& allocator);
----

[.small]#xref:bsl/StringBufContainer/2constructor-0c8.adoc[_» more&period;&period;&period;_]#

Create a `StringBufContainer` object whose buffer contains the characters in the specified `&lsqb;first, last)&rsqb;` range&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class STRING&lowbar;ITER&gt;
xref:bsl/StringBufContainer/2constructor-02.adoc[StringBufContainer](
    STRING&lowbar;ITER first,
    STRING&lowbar;ITER last,
    std::ios&lowbar;base::openmode modeBitMask,
    ALLOCATOR const& allocator);
----

[.small]#xref:bsl/StringBufContainer/2constructor-02.adoc[_» more&period;&period;&period;_]#


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