MCPcopy Create free account
hub / github.com/GameTechDev/PresentMon / CaseInsensitiveCompare

Function CaseInsensitiveCompare

IntelPresentMon/SampleClient/Utils.h:53–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51}
52
53bool CaseInsensitiveCompare(std::string str1, std::string str2) {
54 std::for_each(str1.begin(), str1.end(), [](char& c)
55 {
56 c = std::tolower(static_cast<unsigned char>(c));
57 });
58 std::for_each(str2.begin(), str2.end(), [](char& c)
59 {
60 c = std::tolower(static_cast<unsigned char>(c));
61 });
62 if (str1.compare(str2) == 0)
63 return true;
64 return false;
65}
66
67void GetProcessInformation(std::optional<std::string>& processName, std::optional<unsigned int>& processId) {
68

Callers 1

GetProcessInformationFunction · 0.70

Calls 3

for_eachFunction · 0.85
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected