getline overloads
Declared in <bslstl_string.h>
Replace the contents of the specified str string by extracting characters from the specified is stream until a newline character (`is.widen('
')) is extracted, and return is`. The newline character is removed from the input stream but is not appended to str. If an eof is detected before the newline, then the characters up to the eof are put into str and is.eof() becomes true. If is.good() is false on entry, then do nothing, otherwise if no characters are extracted (e.g., because because the stream is at eof), str will become empty and is.fail() will become true.
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...
Replace the contents of the specified str string by extracting characters from the specified is stream until the specified delim character is extracted, and return is. The delim character is removed from the input stream but is not appended to str. If an eof is detected before delim, then the characters up to the eof are put into str and is.eof() becomes true. If is.good() is false on entry, then do nothing, otherwise if no characters are extracted (e.g., because because the stream is at eof), str will become empty and is.fail() will become true.
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...