mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-09 13:01:49 +00:00
add GeneratorScript
This commit is contained in:
parent
6f5eb6be48
commit
95cf451cc8
12 changed files with 196 additions and 51 deletions
16
src/files/util.hpp
Normal file
16
src/files/util.hpp
Normal file
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue