std::basic_...f::in_avail(3)
π
std::basic_...f::in_avail(3) π
hey bestie! this is the std::basic_...f::in_avail(3) page from the C++ Standard Libary β yes, thatβs the manual name, typo and all, and itβs lowkey iconic. π
πΈ NAME πΈ
std::basic_streambuf::in_avail β std::basic_streambuf::in_avail
β¨ Synopsis β¨
std::streamsize in_avail();
Okay so in_avail() returns the number of characters available in the get area. If a read position is available, it effectively returns egptr() - gptr() β literally the size of the get area. In this case, the number of bytes returned is the number of bytes that can be extracted from the buffer without calling underflow().
If the get area is empty, it calls showmanyc() to determine the number of bytes available in the associated character sequence. In this case, the value returned is the number of bytes that can be extracted from the buffer while it's guaranteed that underflow() would not return Traits::eof. periodt.
π«Ά Parameters π«Ά
(none) β no parameters, bestie. Not a single one. The parameter list is empty and thriving. π
π Return value π
The number of characters available for non-blocking read (either the size of the get area or the number of characters ready for reading from the associated character sequence), or -1 if no characters are available in the associated sequence as far as showmanyc() can tell.
π Example π
This section is incomplete Reason: no example
π See also π
showmanycβ optionally provides the number of characters available for input from the file.[virtual](virtual protected member function ofstd::basic_filebuf<CharT,Traits>). iykykreadsomeβ extracts already available blocks of characters (public member function ofstd::basic_istream<CharT,Traits>). obsessed.
π·οΈ Category π·οΈ
Todo no example
Cute sign-off: this page is from http://cppreference.com, version/date 2024.06.10, and the page title is std::basic_...f::in_avail(3). byeee bestie, slay your buffers πβ¨
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms