add GeneratorScript
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <stdexcept>
|
||||
|
||||
namespace files {
|
||||
inline bool is_valid_name(std::string_view name) {
|
||||
static std::string illegalChars = "\\/%?!<>:; ";
|
||||
for (char c : illegalChars) {
|
||||
if (name.find(c) != std::string::npos) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return !name.empty();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user