summaryrefslogtreecommitdiffstats
path: root/editor/plugins/script_text_editor.cpp
diff options
context:
space:
mode:
authorDanil Alexeev <danil@alexeev.xyz>2022-08-30 12:36:24 +0300
committerDanil Alexeev <danil@alexeev.xyz>2022-08-30 12:36:24 +0300
commitd4555ef5fbf706c43faccf5fdb3f023696197727 (patch)
treeefc5600ae84f8827b800ca7bfd42333ecf38b542 /editor/plugins/script_text_editor.cpp
parent432b25d3649319517827dbf7bc275e81e0a2b92e (diff)
downloadredot-engine-d4555ef5fbf706c43faccf5fdb3f023696197727.tar.gz
Add `String.to_{camel,pascal,snake}_case` methods
Diffstat (limited to 'editor/plugins/script_text_editor.cpp')
-rw-r--r--editor/plugins/script_text_editor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index 85e53011d6..8bb9452938 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -1590,7 +1590,7 @@ void ScriptTextEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data
}
}
- String variable_name = String(node->get_name()).camelcase_to_underscore(true).validate_identifier();
+ String variable_name = String(node->get_name()).to_snake_case().validate_identifier();
if (use_type) {
text_to_drop += vformat("@onready var %s: %s = %s%s\n", variable_name, node->get_class_name(), is_unique ? "%" : "$", path);
} else {