mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-14 02:07:54 -06:00
support cura:// and thingiverse
This commit is contained in:
parent
6519e850ef
commit
524efcfcca
4 changed files with 66 additions and 17 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue