MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / CountArgs

Function CountArgs

extern/re2/re2/testing/regexp_generator.cc:83–91  ·  view source on GitHub ↗

Counts and returns the number of occurrences of "%s" in s.

Source from the content-addressed store, hash-verified

81
82// Counts and returns the number of occurrences of "%s" in s.
83static int CountArgs(const std::string& s) {
84 const char *p = s.c_str();
85 int n = 0;
86 while ((p = strstr(p, "%s")) != NULL) {
87 p += 2;
88 n++;
89 }
90 return n;
91}
92
93// Generates all possible postfix command sequences.
94// Each sequence is handed off to RunPostfix to generate a regular expression.

Callers 3

GeneratePostfixMethod · 0.85
GenerateRandomPostfixMethod · 0.85
RunPostfixMethod · 0.85

Calls 1

c_strMethod · 0.45

Tested by

no test coverage detected