Namespaces
Variants

std::istrstream::str

From cppreference.com
 
 
Input/output library
I/O manipulators
Print functions (C++23)
C-style I/O
Buffers
(deprecated in C++98)(removed in C++26)
Streams
Abstractions
File I/O
String I/O
Array I/O
(deprecated in C++98)(removed in C++26)
(deprecated in C++98)(removed in C++26)
(deprecated in C++98)(removed in C++26)
Synchronized Output
Types
Error category interface
(C++11)
 
 
char* str();
(deprecated in C++98)
(removed in C++26)

Returns the pointer to the beginning of the buffer, after freezing it. Effectively calls rdbuf()->str().

Parameters

(none)

Return value

Pointer to the beginning of the buffer in the associated std::strstreambuf or a null pointer if no buffer is available.


Example