Assign a new value to this string.

Synopsis

Declared in <bslstl_string.h>

basic_string&
assign(
    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

Name

Description

numChars

number of characters

character

character value

Created with MrDocs