diff --git a/modules/gdnative/gdnative/pool_arrays.cpp b/modules/gdnative/gdnative/pool_arrays.cpp index 5b74578d4b5c..e48b82d62bcb 100644 --- a/modules/gdnative/gdnative/pool_arrays.cpp +++ b/modules/gdnative/gdnative/pool_arrays.cpp @@ -381,6 +381,17 @@ void GDAPI godot_pool_string_array_invert(godot_pool_string_array *p_self) { self->invert(); } +godot_string GDAPI godot_pool_string_array_join(godot_pool_string_array *p_self, const godot_string *p_delimiter) { + PoolVector *self = (PoolVector *)p_self; + String &delimiter = *(String *)p_delimiter; + + godot_string str; + String *s = (String *)&str; + memnew_placement(s, String); + *s = self->join(delimiter); + return str; +} + void GDAPI godot_pool_string_array_push_back(godot_pool_string_array *p_self, const godot_string *p_data) { PoolVector *self = (PoolVector *)p_self; String &s = *(String *)p_data; diff --git a/modules/gdnative/gdnative_api.json b/modules/gdnative/gdnative_api.json index 3a56a25e9f78..4475c7f04996 100644 --- a/modules/gdnative/gdnative_api.json +++ b/modules/gdnative/gdnative_api.json @@ -17,7 +17,24 @@ "major": 1, "minor": 2 }, - "next": null, + "next": { + "type": "CORE", + "version": { + "major": 1, + "minor": 3 + }, + "next": null, + "api": [ + { + "name": "godot_pool_string_array_join", + "return_type": "godot_string", + "arguments": [ + ["godot_pool_string_array *", "p_self"], + ["const godot_string *", "p_delimiter"] + ] + } + ] + }, "api": [ { "name": "godot_dictionary_duplicate", diff --git a/modules/gdnative/include/gdnative/pool_arrays.h b/modules/gdnative/include/gdnative/pool_arrays.h index e9a85762471a..680935017b4a 100644 --- a/modules/gdnative/include/gdnative/pool_arrays.h +++ b/modules/gdnative/include/gdnative/pool_arrays.h @@ -275,6 +275,8 @@ godot_error GDAPI godot_pool_string_array_insert(godot_pool_string_array *p_self void GDAPI godot_pool_string_array_invert(godot_pool_string_array *p_self); +godot_string GDAPI godot_pool_string_array_join(godot_pool_string_array *p_self, const godot_string *p_delimiter); + void GDAPI godot_pool_string_array_push_back(godot_pool_string_array *p_self, const godot_string *p_data); void GDAPI godot_pool_string_array_remove(godot_pool_string_array *p_self, const godot_int p_idx);