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

Create a `StringBufContainer` from a string&hyphen;view&hyphen;like initial value&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class STRING&lowbar;VIEW&lowbar;LIKE&lowbar;TYPE&gt;
StringBufContainer(
    STRING&lowbar;VIEW&lowbar;LIKE&lowbar;TYPE const& initialString,
    std::ios&lowbar;base::openmode modeBitMask);
----

== Description

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;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *initialString*
| initial character sequence for the buffer
| *modeBitMask*
| open mode for the contained stream buffer
|===


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