Return a reference providing modifiable access to the character at the specified position in this string. Throw out_of_range if `position >= length()`.

Synopsis

Declared in <bslstl_string.h>

reference
at(size_type position);

Return Value

reference to the character at position

Parameters

Name

Description

position

starting index

Created with MrDocs