MCPcopy Create free account
hub / github.com/alibaba/async_simple / CountFileCharNum

Function CountFileCharNum

demo_example/CountChar.cpp:49–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49Lazy<int> CountFileCharNum(const std::string &filename, char c) {
50 Texts Contents = co_await ReadFile(filename);
51 co_return co_await CountTextChar(Contents, c);
52}
53
54int main() {
55 int Num = syncAwait(CountFileCharNum("demo_example/Input/file.txt", 'x'));

Callers 1

mainFunction · 0.70

Calls 2

ReadFileFunction · 0.70
CountTextCharFunction · 0.70

Tested by

no test coverage detected