Skip to content

Commit

Permalink
Add a note about GDScript format strings in C++ (godotengine#10061)
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronfranke authored Oct 8, 2024
1 parent 7cd9621 commit a74060b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tutorials/scripting/gdscript/gdscript_format_string.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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<class_Variant>` header.

0 comments on commit a74060b

Please sign in to comment.