MCPcopy Create free account
hub / github.com/RcppCore/Rcpp / readLines

Function readLines

src/attributes.cpp:860–870  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

858
859 template <typename Collection>
860 void readLines(std::istream& is, Collection* pLines) {
861 pLines->clear();
862 std::string line;
863 while(std::getline(is, line)) {
864 // strip \r (for the case of windows line terminators on posix)
865 if (line.length() > 0 && *line.rbegin() == '\r')
866 line.erase(line.length()-1, 1);
867 stripTrailingLineComments(&line);
868 pLines->push_back(line);
869 }
870 }
871
872 bool addUniqueDependency(Rcpp::CharacterVector include,
873 std::vector<FileInfo>* pDependencies) {

Callers 2

parseSourceDependenciesFunction · 0.85

Calls 4

eraseMethod · 0.80
lengthMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected