[#BloombergLP-bslstl-StringRefImp-02-assign-0f] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::xref:BloombergLP/bslstl/StringRefImp-02.adoc[StringRefImp<char>]::assign :relfileprefix: ../../../ :mrdocs: Assign this ref to the specified `data` of the specified `length`. == Synopsis Declared in `<bslstl_stringref.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void assign( char const* data, xref:BloombergLP/bslstl/StringRefImp-0c/size_type.adoc[size_type] length); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#