MCPcopy Create free account
hub / github.com/BYVoid/OpenCC / ReadLine

Function ReadLine

src/tools/CommandLineMain.cpp:124–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122MeasurementResult measurement;
123
124bool ReadLine(FILE* fp, std::string* line) {
125 line->clear();
126 int ch;
127 while ((ch = fgetc(fp)) != EOF) {
128 if (ch == '\n') {
129 return true;
130 }
131 line->push_back(static_cast<char>(ch));
132 }
133 return !line->empty();
134}
135
136void CopyFileContents(FILE* src, FILE* dst, const std::string& srcFileName,
137 const std::string& dstFileName) {

Callers 1

ConvertFileStreamsFunction · 0.85

Calls 3

clearMethod · 0.45
push_backMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected