bsl::basic_string::c_str

Return a pointer to the null-terminated character buffer.

Synopsis

Declared in <bslstl_string.h>

CHAR_TYPE const*
c_str() const noexcept;

Description

Return an address providing non-modifiable access to the null-terminated buffer of length() + 1 characters whose contents are identical to the value of this string. Note that any call to the string destructor or any of its manipulators invalidates the returned pointer.

Return Value

pointer to the null-terminated character buffer