diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-10-04 16:05:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-04 16:05:20 +0200 |
commit | 7e9c1041ac1d30c7620713635a76ba4caf29d673 (patch) | |
tree | 13348321a212bd0549a3e106e161eb0c6d124b35 /doc/classes | |
parent | 11bbe152a9c0404c74cf17a79075932e59349ba6 (diff) | |
parent | caa88b4611d22092a4ca799bf1807bc780645015 (diff) |
Merge pull request #32548 from akien-mga/doc-put-string
doc: Add note about sending strings without size in StreamPeer
Diffstat (limited to 'doc/classes')
-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"> |