| 108 | } |
| 109 | |
| 110 | bool 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 | |
| 121 | StringHelper::Decomposition StringHelper::decomposeCaseInsensitiveMatch(std::string const& str, std::string const& toMatch) |
| 122 | { |