std::basic_...f::in_avail(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

πŸ’… 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 of std::basic_filebuf<CharT,Traits>). iykyk
  • readsome β€” extracts already available blocks of characters (public member function of std::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