You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-25 15:37:42 +00:00
Add Options, Functions and Settings to convert Node-Names and Strings to kebab-case
- refactored and renamed String::_camelcase_to_underscore to String:_separate_compound_words - refactored String::to_snake_case to work with the refactored String::_separate_compound_words - created char_utils::is_hyphen to catch all hyphen variants in kebab-case conversion - created String::to_kebab_case using the new String::_separate_compound_words - created corresponding Documentation in String and StringName - simplified both switch statements in EditorNode and ProjectDialog - added new kebab-casing Option for Node Names in ProjectSettings - added missing camelCase Options to Scene- and Node-Names in ProjectSettings - simplified Mono RuntimeInterop Functions - hooked up the ConnectionsDialog - created additional Unit Tests
This commit is contained in:
@@ -1289,6 +1289,10 @@ void godotsharp_string_simplify_path(const String *p_self, String *r_simplified_
|
||||
memnew_placement(r_simplified_path, String(p_self->simplify_path()));
|
||||
}
|
||||
|
||||
void godotsharp_string_capitalize(const String *p_self, String *r_capitalized) {
|
||||
memnew_placement(r_capitalized, String(p_self->capitalize()));
|
||||
}
|
||||
|
||||
void godotsharp_string_to_camel_case(const String *p_self, String *r_camel_case) {
|
||||
memnew_placement(r_camel_case, String(p_self->to_camel_case()));
|
||||
}
|
||||
@@ -1301,6 +1305,10 @@ void godotsharp_string_to_snake_case(const String *p_self, String *r_snake_case)
|
||||
memnew_placement(r_snake_case, String(p_self->to_snake_case()));
|
||||
}
|
||||
|
||||
void godotsharp_string_to_kebab_case(const String *p_self, String *r_kebab_case) {
|
||||
memnew_placement(r_kebab_case, String(p_self->to_kebab_case()));
|
||||
}
|
||||
|
||||
void godotsharp_node_path_get_as_property_path(const NodePath *p_ptr, NodePath *r_dest) {
|
||||
memnew_placement(r_dest, NodePath(p_ptr->get_as_property_path()));
|
||||
}
|
||||
@@ -1700,9 +1708,11 @@ static const void *unmanaged_callbacks[]{
|
||||
(void *)godotsharp_dictionary_get_typed_value_script,
|
||||
(void *)godotsharp_dictionary_to_string,
|
||||
(void *)godotsharp_string_simplify_path,
|
||||
(void *)godotsharp_string_capitalize,
|
||||
(void *)godotsharp_string_to_camel_case,
|
||||
(void *)godotsharp_string_to_pascal_case,
|
||||
(void *)godotsharp_string_to_snake_case,
|
||||
(void *)godotsharp_string_to_kebab_case,
|
||||
(void *)godotsharp_node_path_get_as_property_path,
|
||||
(void *)godotsharp_node_path_get_concatenated_names,
|
||||
(void *)godotsharp_node_path_get_concatenated_subnames,
|
||||
|
||||
Reference in New Issue
Block a user