template<class E, class T, class A>
basic_istream<E, T>& operator>>(
basic_istream <E, T>& is,
const basic_string<E, T, A>& str);
The template function overloads operator>>
to replace the sequence controlled by str
with a sequence of elements
extracted from the stream is
. Extraction stops:
is.
width
()
elements, if that value is nonzero.is.
max_size
()
elements.c
for which use_facet
<
ctype
<E> >(
getloc
()).
is
(
ctype<E>::
space
, c)
is true, in which case the character is put back.If the function extracts no elements, it calls setstate
(ios_base::failbit)
. In any case, it calls width(0)
and
returns *this
.
See the related sample program.