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

Function CountFileCharNum

demo_example/CountCharUsingModules.cpp:45–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45Lazy<int> CountFileCharNum(const std::string &filename, char c) {
46 Texts Contents = co_await ReadFile(filename);
47 co_return co_await CountTextChar(Contents, c);
48}
49
50int main() {
51 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