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);
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);
Return Value
reference to the input stream is
Parameters
Name |
Description |
is |
input stream |
str |
string to read into or parse |
delim |
delimiter character ending the extraction |
Created with MrDocs