Add ability to edit editor feature profiles

Allows enabling/disabling parts of the editor and storing/loading profiles for that.
This commit is contained in:
Juan Linietsky 2019-04-08 19:18:03 -03:00
parent 9ab17b664d
commit a20235aeb0
24 changed files with 1586 additions and 67 deletions

View file

@ -3748,6 +3748,24 @@ bool String::is_valid_html_color() const {
return Color::html_is_valid(*this);
}
bool String::is_valid_filename() const {
String stripped = strip_edges();
if (*this != stripped) {
return false;
}
if (stripped == String()) {
return false;
}
if (find(":") != -1 || find("/") != -1 || find("\\") != -1 || find("?") != -1 || find("*") != -1 || find("\"") != -1 || find("|") != -1 || find("%") != -1 || find("<") != -1 || find(">") != -1) {
return false;
} else {
return true;
}
}
bool String::is_valid_ip_address() const {
if (find(":") >= 0) {