doc: Add note about sending strings without size in StreamPeer

Follow-up to #29153.
This commit is contained in:
Rémi Verschelde 2019-10-04 15:23:12 +02:00
parent b177051521
commit caa88b4611

View file

@ -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">