Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for a snapshot of the develop branch, built from commit 7868a5407c.
PrevUpHomeNext
string::data (2 of 2 overloads)

Return the underlying character array directly.

Synopsis
char const*
data() const noexcept;
Description

Returns a pointer to the underlying array serving as storage.

Remarks

The value returned is such that the range {data(), data() + size()) is always a valid range, even if the container is empty. The value returned from this function is never equal to nullptr.

Complexity

Constant.


PrevUpHomeNext