This commit is contained in:
RipleyTom 2024-01-05 09:43:26 +01:00 committed by GitHub
parent bc141831f7
commit b6e9746198
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 2254 additions and 1770 deletions

View file

@ -652,6 +652,11 @@ std::string fmt::to_lower(std::string_view string)
return result;
}
std::string fmt::truncate(std::string_view src, usz length)
{
return std::string(src.begin(), src.begin() + std::min(src.size(), length));
}
bool fmt::match(const std::string& source, const std::string& mask)
{
usz source_position = 0, mask_position = 0;