MCPcopy Create free account
hub / github.com/chrxh/alien / containsCaseInsensitive

Method containsCaseInsensitive

source/Base/StringHelper.cpp:110–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108}
109
110bool StringHelper::containsCaseInsensitive(std::string const& str, std::string const& toMatch)
111{
112 std::string strLower = str;
113 std::string toMatchLower = toMatch;
114
115 std::transform(str.begin(), str.end(), strLower.begin(), ::tolower);
116 std::transform(toMatch.begin(), toMatch.end(), toMatchLower.begin(), ::tolower);
117
118 return strLower.find(toMatchLower) != std::string::npos;
119}
120
121StringHelper::Decomposition StringHelper::decomposeCaseInsensitiveMatch(std::string const& str, std::string const& toMatch)
122{

Callers

nothing calls this directly

Calls 3

beginMethod · 0.80
endMethod · 0.80
findMethod · 0.80

Tested by

no test coverage detected