A terminating null character is automatically appended.
The returned array points to an internal location with the required storage space for this sequence of characters plus its terminating null-character, but the values in this array should not be modified in the program and are only granted to remain unchanged until the next call to a non-constant member function of the string object.
Parameters
noneReturn Value
Pointer to an internal array containing the c-string equivalent to the string content.Example
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
|
Output:
Please split this phrase into tokens |
Basic template member declaration
( basic_string<charT,traits,Allocator> ) |
See also
| string::copy | Copy sequence of characters from string (public member function) |
| string::data | Get string data (public member function) |
| string::assign | Assign content to string (public member function) |
