cpp/string/basic string/data

Returns a pointer to the underlying array serving as character storage. The pointer is such that the range

is valid and the values in it correspond to the values stored in the string.

The pointer obtained from may be invalidated by:
 * Passing a non-const reference to the string to any standard library function, or
 * Calling non-const member functions on the string, excluding, at, front, back, begin, end, rbegin, rend.

@1@ Modifying the character array accessed through the const overload of has undefined behavior. @2@ Modifying the past-the-end null terminator stored at size to any value other than has undefined behavior.

Parameters
(none)

Return value
A pointer to the underlying character storage.

Complexity
Constant.