[#bsl-basic_stringstream-2constructor-032] = xref:bsl.adoc[bsl]::xref:bsl/basic_stringstream.adoc[basic_stringstream]::basic_stringstream :relfileprefix: ../../ :mrdocs: Create a `basic_stringstream` from a string‐view‐like sequence and mode. == Synopsis Declared in `<bslstl_stringstream.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class STRING_VIEW_LIKE_TYPE> basic_stringstream( STRING_VIEW_LIKE_TYPE const& initialString, ios_base::openmode modeBitMask); ---- == Description Use the specified `initialString` (of a type convertible to `basic_string_view<CHAR_TYPE, CHAR_TRAITS>` but not to `const CHAR_TYPE *`) indicating the initial sequence of characters that this stream will access or manipulate. Use the specified `modeBitMask` to indicate whether this stream may be read from, written to, or both. 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. == Parameters [cols="1,4"] |=== | Name| Description | *initialString* | initial character sequence for the stream | *modeBitMask* | open mode for the stream buffer |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#