mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-19 21:13:35 +00:00
[core] Regex refactoring
Signed-off-by: x7z4w <x7z4w@noreply.codeberg.org>
This commit is contained in:
@@ -4,9 +4,19 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
namespace pl
|
||||
{
|
||||
void EnumerateFiles(std::string const & directory, std::function<void(char const *)> const & fn);
|
||||
|
||||
void EnumerateFilesByRegExp(std::string const & directory, std::string const & regexp, std::vector<std::string> & res);
|
||||
void EnumerateFilesByRegExp(std::string const & directory, boost::regex const & regexp, std::vector<std::string> & res);
|
||||
|
||||
inline void EnumerateFiles(std::string const & directory, std::vector<std::string> & res)
|
||||
{
|
||||
EnumerateFiles(directory, [&](char const * entry)
|
||||
{
|
||||
res.push_back(std::string(entry));
|
||||
});
|
||||
}
|
||||
} // namespace pl
|
||||
|
||||
Reference in New Issue
Block a user