[#bsl-basic_string-0faf-2constructor-07] = xref:bsl.adoc[bsl]::xref:bsl/basic_string-0faf.adoc[basic_string]::basic_string :relfileprefix: ../../ :mrdocs: Create a `basic_string` object. == Synopsis Declared in `<bslstl_string.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class RANGE> basic_string( std::from_range_t tag, RANGE&& range, ALLOCATOR const& basicAllocator = ALLOCATOR()); ---- == Description Create a string that containing the characters from the specified `range`. Optionally specify a `basicAllocator` used to supply memory. If `basicAllocator` is not specified, a default‐constructed allocator is used. Note that `range` must meet the requirements of an input range and the values from `range` must have a type matching or convertible to (template parameter) `CHAR_TYPE`. == Parameters [cols="1,4"] |=== | Name| Description | *tag* | disambiguation tag for range construction | *range* | input range of characters | *basicAllocator* | allocator used to supply memory |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#