[#bsl-basic_string-0e-2constructor-0b] = xref:bsl.adoc[bsl]::xref:bsl/basic_string-0e.adoc[basic_string<wchar_t>]::basic_string :relfileprefix: ../../ :mrdocs: Create a string that has the same value as the substring of the specified `numChars` length starting at the specified `position` in the specified `object`. Optionally specify a `basicAllocator` used to supply memory. If the `basicAllocator` is not specified, a default‐constructed allocator is used. Throw `out_of_range` if `position > original.object()`. == Synopsis Declared in `<bslstl_string.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class STRING_VIEW_LIKE_TYPE> basic_string( STRING_VIEW_LIKE_TYPE const& object, xref:bsl/basic_string-0e/size_type.adoc[size_type] position, xref:bsl/basic_string-0e/size_type.adoc[size_type] numChars, xref:bsl/allocator-0df.adoc[allocator<wchar_t>] const& basicAllocator = ALLOCATOR()); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#