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:
commit
7e9c1041ac
1 changed files with 8 additions and 0 deletions
|
@ -211,6 +211,10 @@
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
Puts a zero-terminated ASCII string into the stream prepended by a 32-bit unsigned integer representing its size.
|
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>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="put_u16">
|
<method name="put_u16">
|
||||||
|
@ -256,6 +260,10 @@
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
Puts a zero-terminated UTF-8 string into the stream prepended by a 32 bits unsigned integer representing its size.
|
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>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="put_var">
|
<method name="put_var">
|
||||||
|
|
Loading…
Reference in a new issue