mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 11:01:49 +00:00
16 lines
364 B
C++
16 lines
364 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
#include <stdexcept>
|
|
|
|
namespace io {
|
|
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();
|
|
}
|
|
}
|