Common: Replace StringBeginsWith/StringEndsWith with std equivalents

Obsoletes these functions in favor of the standard member functions
added in C++20.
This commit is contained in:
Lioncash
2023-01-24 14:25:49 -05:00
parent ba6ee9d7ba
commit e5b91f00b0
21 changed files with 57 additions and 97 deletions

View File

@ -107,7 +107,7 @@ static std::string ReadCpuinfoField(const std::string& field)
while (std::getline(file, line))
{
if (!StringBeginsWith(line, field))
if (!line.starts_with(field))
continue;
auto non_tab = line.find_first_not_of("\t", field.length());
if (non_tab == line.npos)