From 99e369e4a72ab42d78b7d5cb977f2a0d4f8b1724 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 16 Feb 2017 13:02:30 -0800 Subject: [PATCH] Use ascii_to_lowercase() --- toolsrc/src/vcpkg_Strings.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/toolsrc/src/vcpkg_Strings.cpp b/toolsrc/src/vcpkg_Strings.cpp index b19d5def09..d021aa18c3 100644 --- a/toolsrc/src/vcpkg_Strings.cpp +++ b/toolsrc/src/vcpkg_Strings.cpp @@ -58,8 +58,7 @@ namespace vcpkg::Strings std::string::const_iterator case_insensitive_ascii_find(const std::string& s, const std::string& pattern) { - std::string pattern_as_lower_case; - std::transform(pattern.begin(), pattern.end(), back_inserter(pattern_as_lower_case), &details::tolower_char); + const std::string pattern_as_lower_case(ascii_to_lowercase(pattern)); return search(s.begin(), s.end(), pattern_as_lower_case.begin(), pattern_as_lower_case.end(), [](const char a, const char b) { return details::tolower_char(a) == b;