bsl::getline

Read characters from a stream into a string.

Synopses

Declared in <bslstl_string.h>

Read characters from a stream into a string.

template<
    class CHAR_TYPE,
    class CHAR_TRAITS,
    class ALLOCATOR>
std::basic_istream<CHAR_TYPE, CHAR_TRAITS>&
getline(
    std::basic_istream<CHAR_TYPE, CHAR_TRAITS>& is,
    basic_string<CHAR_TYPE, CHAR_TRAITS, ALLOCATOR>& str);
» more...
template<
    typename _CharT2,
    typename _Traits2,
    typename _Alloc>
basic_istream<_CharT2, _Traits2>&
getline(
    basic_istream<_CharT2, _Traits2>&,
    basic_string<_CharT2, _Traits2, _Alloc>&,
    _CharT2);
» more...
template<
    typename _CharT2,
    typename _Traits2,
    typename _Alloc>
basic_istream<_CharT2, _Traits2>&
getline(
    basic_istream<_CharT2, _Traits2>&,
    basic_string<_CharT2, _Traits2, _Alloc>&,
    _CharT2);
» more...

Read characters from a stream into a string.

template<
    class CHAR_TYPE,
    class CHAR_TRAITS,
    class ALLOCATOR>
std::basic_istream<CHAR_TYPE, CHAR_TRAITS>&
getline(
    std::basic_istream<CHAR_TYPE, CHAR_TRAITS>& is,
    basic_string<CHAR_TYPE, CHAR_TRAITS, ALLOCATOR>& str,
    CHAR_TYPE delim);
» more...

Return Value

reference to the input stream is

Parameters

NameDescription
isinput stream
strstring to read into or parse
delimdelimiter character ending the extraction