bsl::basic_string::basic_string

Create a basic_string object.

Synopsis

Declared in <bslstl_string.h>

template<class INPUT_ITER>
basic_string(
    INPUT_ITER first,
    INPUT_ITER last,
    ALLOCATOR const& basicAllocator = ALLOCATOR());

Description

Create a string from the characters in the range starting at the specified first iterator and ending right before the specified last iterator of the (template parameter) type INPUT_ITER. Optionally specify a basicAllocator used to supply memory. If basicAllocator is not specified, a default-constructed allocator is used. The behavior is undefined unless first and last refer to a sequence of valid values where first is at a position at or before last.

Parameters

NameDescription
firstbeginning of the range (inclusive)
lastend of the range (exclusive)
basicAllocatorallocator used to supply memory