[#bsl-basic_string-0faf-assign-03c] = xref:bsl.adoc[bsl]::xref:bsl/basic_string-0faf.adoc[basic_string]::assign :relfileprefix: ../../ :mrdocs: Assign a new value to this string. == Synopsis Declared in `<bslstl_string.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/basic_string-0faf.adoc[basic_string]& assign( xref:bsl/basic_string-0faf/size_type.adoc[size_type] numChars, CHAR_TYPE character); ---- == Description Assign to this string the value of a string of the specified `numChars` length whose every character is equal to the specified `character`, and return a reference providing modifiable access to this string. == Return Value reference providing modifiable access to this string == Parameters [cols="1,4"] |=== | Name| Description | *numChars* | number of characters | *character* | character value |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#