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

Function CountTextChar

demo_example/CountCharUsingModules.cpp:38–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

CountFileCharNumFunction · 0.70

Calls 1

CountLineCharFunction · 0.70

Tested by

no test coverage detected