Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext
string::operator[] (2 of 2 overloads)

Return a character without bounds checking.

Synopsis
const char&
operator\[\](
    std::size_t pos) const;
Description

Returns a reference to the character specified at location pos.

Complexity

Constant.

Precondition
pos >= size
Parameters

Name

Description

pos

A zero-based index to access.


PrevUpHomeNext