diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2019-10-04 15:23:12 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2019-10-04 15:23:12 +0200 |
commit | caa88b4611d22092a4ca799bf1807bc780645015 (patch) | |
tree | 2d5485e8b76d274e0fdc50ad9933e603b8376abd /doc/classes/StreamPeer.xml | |
parent | b177051521631f77092dc2513873afbd7015d4bb (diff) |
doc: Add note about sending strings without size in StreamPeer
Follow-up to #29153.
Diffstat (limited to 'doc/classes/StreamPeer.xml')
-rw-r--r-- | doc/classes/StreamPeer.xml | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/classes/StreamPeer.xml b/doc/classes/StreamPeer.xml index 678c587f8d..2a1919071a 100644 --- a/doc/classes/StreamPeer.xml +++ b/doc/classes/StreamPeer.xml @@ -211,6 +211,10 @@ </argument> <description> Puts a zero-terminated ASCII string into the stream prepended by a 32-bit unsigned integer representing its size. + Note: To put an ASCII string without prepending its size, you can use [method put_data]: + [codeblock] + put_data("Hello world".to_ascii()) + [/codeblock] </description> </method> <method name="put_u16"> @@ -256,6 +260,10 @@ </argument> <description> Puts a zero-terminated UTF-8 string into the stream prepended by a 32 bits unsigned integer representing its size. + Note: To put an UTF-8 string without prepending its size, you can use [method put_data]: + [codeblock] + put_data("Hello world".to_utf8()) + [/codeblock] </description> </method> <method name="put_var"> |