mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-28 13:22:06 +00:00
support cura:// and thingiverse
This commit is contained in:
@@ -239,6 +239,12 @@ inline bool is_thingiverse_link(const std::string& url) {
|
||||
const std::regex url_regex("(http|https)://www.thingiverse.com", std::regex_constants::icase);
|
||||
return std::regex_match(url, url_regex);
|
||||
}
|
||||
|
||||
// sanitize a string to be used as a filename
|
||||
inline std::string sanitize_filename(const std::string &filename){
|
||||
const std::regex special_chars("[/\\\\:*?\"<>|]");
|
||||
return std::regex_replace(filename, special_chars, "_");
|
||||
}
|
||||
// File path / name / extension splitting utilities, working with UTF-8,
|
||||
// to be published to Perl.
|
||||
namespace PerlUtils {
|
||||
|
||||
Reference in New Issue
Block a user