diff options
author | Danil Alexeev <danil@alexeev.xyz> | 2022-08-30 12:36:24 +0300 |
---|---|---|
committer | Danil Alexeev <danil@alexeev.xyz> | 2022-08-30 12:36:24 +0300 |
commit | d4555ef5fbf706c43faccf5fdb3f023696197727 (patch) | |
tree | efc5600ae84f8827b800ca7bfd42333ecf38b542 /editor/plugins/script_text_editor.cpp | |
parent | 432b25d3649319517827dbf7bc275e81e0a2b92e (diff) | |
download | redot-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.cpp | 2 |
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 { |