[#BloombergLP-bslstl-StringRefImp-02-assign-09] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::xref:BloombergLP/bslstl/StringRefImp-02.adoc[StringRefImp<char>]::assign :relfileprefix: ../../../ :mrdocs: Bind this string reference to the string at the specified `data` address and extending for `std::char_traits<CHAR_TYPE>::length(data)` characters. The string at the `data` address must remain valid as long as it is bound to this string reference. The behavior is undefined unless `data` is null‐terminated. == Synopsis Declared in `<bslstl_stringref.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void assign(char const* data); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#