From a04b7d97805bef8229fa60b43159ffd010958fa3 Mon Sep 17 00:00:00 2001 From: Aaron Franke Date: Tue, 8 Oct 2024 06:23:56 -0500 Subject: [PATCH] Add a note about GDScript format strings in C++ (#10061) --- tutorials/scripting/gdscript/gdscript_format_string.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tutorials/scripting/gdscript/gdscript_format_string.rst b/tutorials/scripting/gdscript/gdscript_format_string.rst index 8d511d664..37ab33f53 100644 --- a/tutorials/scripting/gdscript/gdscript_format_string.rst +++ b/tutorials/scripting/gdscript/gdscript_format_string.rst @@ -285,3 +285,6 @@ Combining both the ``String.format`` method and the ``%`` operator could be usef +---------------------------------------------------------------------------+-------------------+ | ``"Hi, {0} v{version}".format({0:"Godette", "version":"%0.2f" % 3.114})`` | Hi, Godette v3.11 | +---------------------------------------------------------------------------+-------------------+ + +In Godot's C++ code, GDScript format strings can be accessed using the +``vformat`` helper function in the :ref:`Variant` header.