[#BloombergLP-bslstl-StringRefImp-0a-2constructor-03] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::xref:BloombergLP/bslstl/StringRefImp-0a.adoc[StringRefImp<wchar_t>]::StringRefImp :relfileprefix: ../../../ :mrdocs: Create a string‐reference object having a valid `std::string` value, whose external representation begins at the specified `data` address and extends for the specified `length`. The external representation must remain valid as long as it is bound to this string reference. Passing 0 has the same effect as default construction. The behavior is undefined unless `0 <= length` and, if `0 == data`, then `0 == length`. Note that, like an `std::string`, the `data` need not be null‐terminated and may contain embedded null characters. Note that the template and non‐template versions combine to allow various integral and enumeration types to be used for length while preventing `(char *, 0)` initializer arguments from matching the two‐iterator constructor below. == Synopsis Declared in `<bslstl_stringref.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class INT_TYPE> StringRefImp( wchar_t const* data, INT_TYPE length) requires bsl::is_integral<INT_TYPE>::value; ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#