mirror of
https://github.com/DarkStore-3DS/DarkStore.git
synced 2026-07-03 00:39:02 +00:00
UNIVERSAL-UPDATER IS BACK! Lmao.
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
#include "utils/stringutils.hpp"
|
||||
|
||||
bool matchPattern(std::string pattern, std::string tested)
|
||||
{
|
||||
std::regex patternRegex(pattern);
|
||||
return regex_match(tested, patternRegex);
|
||||
}
|
||||
|
||||
std::string StringUtils::format(const std::string& fmt_str, ...)
|
||||
{
|
||||
va_list ap;
|
||||
char* fp = NULL;
|
||||
va_start(ap, fmt_str);
|
||||
vasprintf(&fp, fmt_str.c_str(), ap);
|
||||
va_end(ap);
|
||||
std::unique_ptr<char, decltype(free)*> formatted(fp, free);
|
||||
return std::string(formatted.get());
|
||||
}
|
||||
Reference in New Issue
Block a user