summaryrefslogtreecommitdiffstats
path: root/doc/classes
diff options
context:
space:
mode:
authorYuri Sizov <11782833+YuriSizov@users.noreply.github.com>2023-03-25 15:05:59 +0100
committerGitHub <noreply@github.com>2023-03-25 15:05:59 +0100
commite4e63f976abb264f109725b6524cd8aa38d99ac0 (patch)
treeb6999a4d98db716d84b4e267286d301e683c6213 /doc/classes
parent82814f42b964e0916e71c295cea568d5c80222ba (diff)
parentd72b5632505a308e7f7a8a534d308884e80936db (diff)
downloadredot-engine-e4e63f976abb264f109725b6524cd8aa38d99ac0.tar.gz
Merge pull request #73225 from bruvzg/wchar_to_from
Add GDScript `to_wchar_buffer` and `get_string_from_wchar` functions.
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/PackedByteArray.xml6
-rw-r--r--doc/classes/String.xml6
-rw-r--r--doc/classes/StringName.xml6
3 files changed, 18 insertions, 0 deletions
diff --git a/doc/classes/PackedByteArray.xml b/doc/classes/PackedByteArray.xml
index 081215f6b7..a3f23fa7ae 100644
--- a/doc/classes/PackedByteArray.xml
+++ b/doc/classes/PackedByteArray.xml
@@ -328,6 +328,12 @@
Converts UTF-8 encoded array to [String]. Slower than [method get_string_from_ascii] but supports UTF-8 encoded data. Use this function if you are unsure about the source of the data. For user input this function should always be preferred. Returns empty string if source array is not valid UTF-8 string.
</description>
</method>
+ <method name="get_string_from_wchar" qualifiers="const">
+ <return type="String" />
+ <description>
+ Converts wide character ([code]wchar_t[/code], UTF-16 on Windows, UTF-32 on other platforms) encoded array to [String]. Returns empty string if source array is not valid wide string.
+ </description>
+ </method>
<method name="has" qualifiers="const">
<return type="bool" />
<param index="0" name="value" type="int" />
diff --git a/doc/classes/String.xml b/doc/classes/String.xml
index d629a31bca..1f4ffa417d 100644
--- a/doc/classes/String.xml
+++ b/doc/classes/String.xml
@@ -946,6 +946,12 @@
Converts the string to a [url=https://en.wikipedia.org/wiki/UTF-8]UTF-8[/url] encoded [PackedByteArray]. This method is slightly slower than [method to_ascii_buffer], but supports all UTF-8 characters. For most cases, prefer using this method.
</description>
</method>
+ <method name="to_wchar_buffer" qualifiers="const">
+ <return type="PackedByteArray" />
+ <description>
+ Converts the string to a [url=https://en.wikipedia.org/wiki/Wide_character]wide character[/url] ([code]wchar_t[/code], UTF-16 on Windows, UTF-32 on other platforms) encoded [PackedByteArray].
+ </description>
+ </method>
<method name="trim_prefix" qualifiers="const">
<return type="String" />
<param index="0" name="prefix" type="String" />
diff --git a/doc/classes/StringName.xml b/doc/classes/StringName.xml
index 192cb1a6c2..2140c53e20 100644
--- a/doc/classes/StringName.xml
+++ b/doc/classes/StringName.xml
@@ -853,6 +853,12 @@
Converts the string to a [url=https://en.wikipedia.org/wiki/UTF-8]UTF-8[/url] encoded [PackedByteArray]. This method is slightly slower than [method to_ascii_buffer], but supports all UTF-8 characters. For most cases, prefer using this method.
</description>
</method>
+ <method name="to_wchar_buffer" qualifiers="const">
+ <return type="PackedByteArray" />
+ <description>
+ Converts the string to a [url=https://en.wikipedia.org/wiki/Wide_character]wide character[/url] ([code]wchar_t[/code], UTF-16 on Windows, UTF-32 on other platforms) encoded [PackedByteArray].
+ </description>
+ </method>
<method name="trim_prefix" qualifiers="const">
<return type="String" />
<param index="0" name="prefix" type="String" />