Use Strings::ascii_to_lowercase()

This commit is contained in:
Alexander Karatarakis 2017-02-15 20:39:49 -08:00
parent b80cdd1118
commit d86c1ddd6c

View File

@ -1,6 +1,7 @@
#include "pch.h"
#include "triplet.h"
#include "vcpkg_Checks.h"
#include "vcpkg_Strings.h"
namespace vcpkg
{
@ -37,9 +38,7 @@ namespace vcpkg
triplet triplet::from_canonical_name(const std::string& triplet_as_string)
{
std::string s(triplet_as_string);
std::transform(s.begin(), s.end(), s.begin(), ::tolower);
const std::string s(Strings::ascii_to_lowercase(triplet_as_string));
auto it = std::find(s.cbegin(), s.cend(), '-');
Checks::check_exit(it != s.cend(), "Invalid triplet: %s", triplet_as_string);