STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
vstring.h File Reference
#include <ext/vstring_util.h>
#include <ext/rc_string_base.h>
#include <ext/sso_string_base.h>
#include "vstring.tcc"

Go to the source code of this file.

Functions

namespace std _GLIBCXX_VISIBILITY (default)
 

Detailed Description

This file is a GNU extension to the Standard C++ Library.

Function Documentation

namespace std _GLIBCXX_VISIBILITY ( default  )

Read stream into a string.

Parameters
__isInput stream.
__strBuffer to store into.
Returns
Reference to the input stream.

Stores characters from __is into __str until whitespace is found, the end of the stream is encountered, or str.max_size() is reached. If is.width() is non-zero, that is the limit on the number of characters stored into __str. Any previous contents of __str are erased.

Write string to a stream.

Parameters
__osOutput stream.
__strString to write out.
Returns
Reference to the output stream.

Output characters of __str into os following the same rules as for writing a C string.

Read a line from stream into a string.

Parameters
__isInput stream.
__strBuffer to store into.
__delimCharacter marking end of line.
Returns
Reference to the input stream.

Stores characters from __is into __str until __delim is found, the end of the stream is encountered, or str.max_size() is reached. If is.width() is non-zero, that is the limit on the number of characters stored into __str. Any previous contents of __str are erased. If delim was encountered, it is extracted but not stored into __str.

Read a line from stream into a string.

Parameters
__isInput stream.
__strBuffer to store into.
Returns
Reference to the input stream.

Stores characters from is into __str until '
' is found, the end of the stream is encountered, or str.max_size() is reached. If is.width() is non-zero, that is the limit on the number of characters stored into __str. Any previous contents of __str are erased. If end of line was encountered, it is extracted but not stored into __str.

2487 {
2488 _GLIBCXX_BEGIN_NAMESPACE_VERSION
2489 
2502  template<typename _CharT, typename _Traits, typename _Alloc,
2503  template <typename, typename, typename> class _Base>
2504  basic_istream<_CharT, _Traits>&
2505  operator>>(basic_istream<_CharT, _Traits>& __is,
2506  __gnu_cxx::__versa_string<_CharT, _Traits,
2507  _Alloc, _Base>& __str);
2508 
2518  template<typename _CharT, typename _Traits, typename _Alloc,
2519  template <typename, typename, typename> class _Base>
2520  inline basic_ostream<_CharT, _Traits>&
2521  operator<<(basic_ostream<_CharT, _Traits>& __os,
2522  const __gnu_cxx::__versa_string<_CharT, _Traits, _Alloc,
2523  _Base>& __str)
2524  {
2525  // _GLIBCXX_RESOLVE_LIB_DEFECTS
2526  // 586. string inserter not a formatted function
2527  return __ostream_insert(__os, __str.data(), __str.size());
2528  }
2529 
2544  template<typename _CharT, typename _Traits, typename _Alloc,
2545  template <typename, typename, typename> class _Base>
2546  basic_istream<_CharT, _Traits>&
2547  getline(basic_istream<_CharT, _Traits>& __is,
2548  __gnu_cxx::__versa_string<_CharT, _Traits, _Alloc, _Base>& __str,
2549  _CharT __delim);
2550 
2564  template<typename _CharT, typename _Traits, typename _Alloc,
2565  template <typename, typename, typename> class _Base>
2566  inline basic_istream<_CharT, _Traits>&
2567  getline(basic_istream<_CharT, _Traits>& __is,
2568  __gnu_cxx::__versa_string<_CharT, _Traits, _Alloc, _Base>& __str)
2569  { return getline(__is, __str, __is.widen('\n')); }
2570 
2571 _GLIBCXX_END_NAMESPACE_VERSION
2572 } // namespace
std::basic_istream< _CharT, _Traits > & operator>>(std::basic_istream< _CharT, _Traits > &__is, basic_string< _CharT, _Traits, _Allocator > &__str)
Definition: string:1122
std::basic_istream< _CharT, _Traits > & getline(std::basic_istream< _CharT, _Traits > &__is, basic_string< _CharT, _Traits, _Allocator > &__str, _CharT __delim)
Definition: string:1132