mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-02 04:51:26 +12:00
Remove unused fmt::match function
This commit is contained in:
parent
486e93f418
commit
982dac9446
2 changed files with 0 additions and 41 deletions
|
@ -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())
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue