16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-18 18:09:18 +02:00

Replace string_starts_with and string_ends_with with string::starts_with and string::ends_with

This commit is contained in:
docentYT
2026-05-01 13:33:32 +02:00
parent 614a7f51a5
commit bd21b8f49c
5 changed files with 8 additions and 27 deletions

View File

@@ -215,22 +215,6 @@ std::string to_minutes_str(float const Minutes, bool const Leadingzero, int cons
return (minutes.substr(minutes.size() - width, width) + fractionlabels[static_cast<int>(std::floor(minutesfractional * 10 + 0.1))]);
}
bool string_ends_with(const std::string &string, const std::string &ending)
{
if (string.length() < ending.length())
return false;
return string.compare(string.length() - ending.length(), ending.length(), ending) == 0;
}
bool string_starts_with(const std::string &string, const std::string &begin)
{
if (string.length() < begin.length())
return false;
return string.compare(0, begin.length(), begin) == 0;
}
int stol_def(const std::string &str, const int &DefaultValue)
{