Create a string filled with copies of a character.
Declared in <bslstl_string.h>
template<>
requires bsl::IsStdAllocator<ALLOCATOR>::value
basic_string(
size_type numChars,
CHAR_TYPE character,
ALLOCATOR const& basicAllocator = ALLOCATOR());
Create a string of the specified numChars length whose every position contains the specified character. Optionally specify a basicAllocator used to supply memory. If basicAllocator is not specified, a default-constructed allocator is used.
| Name | Description |
|---|---|
| numChars | number of characters |
| character | character value used to fill the string |
| basicAllocator | allocator used to supply memory |