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

Function CountTextChar

demo_example/CountChar.cpp:42–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40}
41
42Lazy<int> CountTextChar(const Texts &Content, char c) {
43 int Result = 0;
44 for (const auto &line : Content)
45 Result += co_await CountLineChar(line, c);
46 co_return Result;
47}
48
49Lazy<int> CountFileCharNum(const std::string &filename, char c) {
50 Texts Contents = co_await ReadFile(filename);

Callers 1

CountFileCharNumFunction · 0.70

Calls 1

CountLineCharFunction · 0.70

Tested by

no test coverage detected