Add String::replace_char(s) methods for performance and convenience

This commit is contained in:
A Thousand Ships
2024-05-28 12:15:00 +02:00
parent c374ce211c
commit 889410dcda
67 changed files with 297 additions and 137 deletions

View File

@@ -568,8 +568,8 @@ void EditorSpinSlider::_evaluate_input_text() {
expr.instantiate();
// Convert commas ',' to dots '.' for French/German etc. keyboard layouts.
String text = value_input->get_text().replace(",", ".");
text = text.replace(";", ",");
String text = value_input->get_text().replace_char(',', '.');
text = text.replace_char(';', ',');
text = TS->parse_number(text);
Error err = expr->parse(text);