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

Name

Description

first

beginning of the range (inclusive)

last

end of the range (exclusive)

basicAllocator

allocator used to supply memory

Created with MrDocs