diff --git a/Utilities/StrFmt.cpp b/Utilities/StrFmt.cpp index ec69294934..c628a90a8a 100644 --- a/Utilities/StrFmt.cpp +++ b/Utilities/StrFmt.cpp @@ -875,45 +875,6 @@ 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; - - for (; source_position < source.size() && mask_position < mask.size(); ++mask_position, ++source_position) - { - switch (mask[mask_position]) - { - case '?': break; - - case '*': - for (usz test_source_position = source_position; test_source_position < source.size(); ++test_source_position) - { - if (match(source.substr(test_source_position), mask.substr(mask_position + 1))) - { - return true; - } - } - return false; - - default: - if (source[source_position] != mask[mask_position]) - { - return false; - } - - break; - } - } - - if (source_position != source.size()) - return false; - - if (mask_position != mask.size()) - return false; - - return true; -} - std::string get_file_extension(const std::string& file_path) { if (usz dotpos = file_path.find_last_of('.'); dotpos != std::string::npos && dotpos + 1 < file_path.size()) diff --git a/Utilities/StrUtil.h b/Utilities/StrUtil.h index 2ef5a25ad7..c28efda863 100644 --- a/Utilities/StrUtil.h +++ b/Utilities/StrUtil.h @@ -201,8 +201,6 @@ namespace fmt // Returns the string shortened to length std::string truncate(std::string_view src, usz length); - bool match(const std::string& source, const std::string& mask); - struct buf_to_hexstring { buf_to_hexstring(const u8* buf, usz len, usz line_length = 16, bool with_prefix = false)