1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

Add String.to_{camel,pascal,snake}_case methods

This commit is contained in:
Danil Alexeev
2022-08-30 12:36:24 +03:00
parent 432b25d364
commit d4555ef5fb
18 changed files with 234 additions and 88 deletions

View File

@@ -161,7 +161,7 @@ void ShaderCreateDialog::_create_new() {
shader = text_shader;
StringBuilder code;
code += vformat("shader_type %s;\n", mode_menu->get_text().replace(" ", "").camelcase_to_underscore());
code += vformat("shader_type %s;\n", mode_menu->get_text().to_snake_case());
if (current_template == 0) { // Default template.
code += "\n";