Merge pull request #32548 from akien-mga/doc-put-string

doc: Add note about sending strings without size in StreamPeer
This commit is contained in:
Rémi Verschelde 2019-10-04 16:05:20 +02:00 committed by GitHub
commit 7e9c1041ac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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