MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / occurencesInString

Function occurencesInString

src/Core/Utils/StringUtils.cpp:24–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22 }
23
24 int occurencesInString(const std::string& str, const std::string& occur)
25 {
26 int occurrences = 0;
27 std::string::size_type start = 0;
28 while ((start = str.find(occur, start)) != std::string::npos)
29 {
30 ++occurrences;
31 start += occur.length();
32 }
33 return occurrences;
34 }
35
36 bool isStringAlpha(const std::string& str)
37 {

Callers 2

isStringFloatFunction · 0.85
useTriggerMethod · 0.85

Calls 2

findMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected