classref: Sync with current master branch (bdf625b)

This commit is contained in:
Godot Organization
2025-01-04 03:20:59 +00:00
parent cb6eb02112
commit eab235f772
37 changed files with 496 additions and 345 deletions
+4 -4
View File
@@ -737,10 +737,10 @@ See also the :doc:`GDScript format string <../tutorials/scripting/gdscript/gdscr
::
print("{0} {1}".format(["{1}", "x"])) # Prints "x x".
print("{0} {1}".format(["x", "{0}"])) # Prints "x {0}".
print("{a} {b}".format({"a": "{b}", "b": "c"})) # Prints "c c".
print("{a} {b}".format({"b": "c", "a": "{b}"})) # Prints "{b} c".
print("{0} {1}".format(["{1}", "x"])) # Prints "x x"
print("{0} {1}".format(["x", "{0}"])) # Prints "x {0}"
print("{a} {b}".format({"a": "{b}", "b": "c"})) # Prints "c c"
print("{a} {b}".format({"b": "c", "a": "{b}"})) # Prints "{b} c"
\ **Note:** In C#, it's recommended to `interpolate strings with "$" <https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated>`__, instead.