diff options
author | Emmanuel Leblond <emmanuel.leblond@gmail.com> | 2017-04-17 15:26:22 +0200 |
---|---|---|
committer | Emmanuel Leblond <emmanuel.leblond@gmail.com> | 2017-04-17 15:48:26 +0200 |
commit | 8400de76a73ff56de28d944c3c6a480eb1e683c6 (patch) | |
tree | a0f9d09327345f64913f687e0e810e7fdbfa8b90 /modules/gdnative | |
parent | 95fe6b5d8c42faef20c9f69cfc1883ffd9ce5104 (diff) |
Add godot_string_unicode_str to GDnative
Diffstat (limited to 'modules/gdnative')
-rw-r--r-- | modules/gdnative/godot/godot_string.cpp | 5 | ||||
-rw-r--r-- | modules/gdnative/godot/godot_string.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/modules/gdnative/godot/godot_string.cpp b/modules/gdnative/godot/godot_string.cpp index 757b8510cf..92c0b04041 100644 --- a/modules/gdnative/godot/godot_string.cpp +++ b/modules/gdnative/godot/godot_string.cpp @@ -80,6 +80,11 @@ const char GDAPI *godot_string_c_str(const godot_string *p_str) { return s->utf8().get_data(); } +const wchar_t GDAPI *godot_string_unicode_str(const godot_string *p_str) { + const String *s = (const String *)p_str; + return s->c_str(); +} + godot_bool GDAPI godot_string_operator_equal(const godot_string *p_a, const godot_string *p_b) { String *a = (String *)p_a; String *b = (String *)p_b; diff --git a/modules/gdnative/godot/godot_string.h b/modules/gdnative/godot/godot_string.h index 9289531c5e..cf5a22dd8d 100644 --- a/modules/gdnative/godot/godot_string.h +++ b/modules/gdnative/godot/godot_string.h @@ -53,6 +53,7 @@ void GDAPI godot_string_copy_string(const godot_string *p_dest, const godot_stri wchar_t GDAPI *godot_string_operator_index(godot_string *p_str, const godot_int p_idx); const char GDAPI *godot_string_c_str(const godot_string *p_str); +const wchar_t GDAPI *godot_string_unicode_str(const godot_string *p_str); godot_bool GDAPI godot_string_operator_equal(const godot_string *p_a, const godot_string *p_b); godot_bool GDAPI godot_string_operator_less(const godot_string *p_a, const godot_string *p_b); |