summaryrefslogtreecommitdiff
path: root/modules/gdnative/godot/godot_string.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gdnative/godot/godot_string.cpp')
-rw-r--r--modules/gdnative/godot/godot_string.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/gdnative/godot/godot_string.cpp b/modules/gdnative/godot/godot_string.cpp
index 92c0b04041..59d20c6d23 100644
--- a/modules/gdnative/godot/godot_string.cpp
+++ b/modules/gdnative/godot/godot_string.cpp
@@ -53,6 +53,12 @@ void GDAPI godot_string_new_data(godot_string *p_str, const char *p_contents, co
*p = String::utf8(p_contents, p_size);
}
+void GDAPI godot_string_new_unicode_data(godot_string *p_str, const wchar_t *p_contents, const int p_size) {
+ String *p = (String *)p_str;
+ memnew_placement(p, String);
+ *p = String(p_contents, p_size);
+}
+
void GDAPI godot_string_get_data(const godot_string *p_str, char *p_dest, int *p_size) {
String *p = (String *)p_str;
if (p_size != NULL) {