Skip to content

Commit d4363d5

Browse files
authored
Update String.xml
Fixed hex_decode() example
1 parent ef1153b commit d4363d5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/classes/String.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,12 +367,12 @@
367367
[gdscript]
368368
var text = "hello world"
369369
var encoded = text.to_utf8_buffer().hex_encode() # outputs "68656c6c6f20776f726c64"
370-
print(buf.hex_decode().get_string_from_utf8())
370+
print(encoded.hex_decode().get_string_from_utf8())
371371
[/gdscript]
372372
[csharp]
373373
var text = "hello world";
374374
var encoded = text.ToUtf8Buffer().HexEncode(); // outputs "68656c6c6f20776f726c64"
375-
GD.Print(buf.HexDecode().GetStringFromUtf8());
375+
GD.Print(encoded.HexDecode().GetStringFromUtf8());
376376
[/csharp]
377377
[/codeblocks]
378378
</description>

0 commit comments

Comments
 (0)