Add GDScript to_wchar_buffer and get_string_from_wchar functions.

This commit is contained in:
bruvzg
2023-02-13 16:18:12 +02:00
parent 2a05522283
commit d72b563250
8 changed files with 44 additions and 1 deletions

View File

@ -5034,6 +5034,14 @@ Vector<uint8_t> String::to_utf32_buffer() const {
return retval;
}
Vector<uint8_t> String::to_wchar_buffer() const {
#ifdef WINDOWS_ENABLED
return to_utf16_buffer();
#else
return to_utf32_buffer();
#endif
}
#ifdef TOOLS_ENABLED
/**
* "Tools TRanslate". Performs string replacement for internationalization

View File

@ -455,6 +455,7 @@ public:
Vector<uint8_t> to_utf8_buffer() const;
Vector<uint8_t> to_utf16_buffer() const;
Vector<uint8_t> to_utf32_buffer() const;
Vector<uint8_t> to_wchar_buffer() const;
String(const char *p_str);
String(const wchar_t *p_str);