stc
Loading...
Searching...
No Matches
Functions
stc::StdFix Namespace Reference

Functions

std::istream & getline (std::istream &is, std::string &str)
 

Function Documentation

◆ getline()

std::istream & stc::StdFix::getline ( std::istream &  is,
std::string &  str 
)
inline

Implementation of std::getline that handles \r,
, and \r
.

This lets you consume arbitrary files of unknown line endings without breaking hard because you're accidentally parsing a CRLF file on Linux, where getline only checks for
.

Parameters
isAn input stream to get the line from
[out]strThe string to put the line in.