Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@ in a way similar to C's ``sprintf()``:
vformat("%d bugs on the wall!", 1234);
vformat("Pi is approximately %f.", 3.1416);

// Converts the resulting String into a `const char *`.
// You may need to do this if passing the result as an argument
// to a method that expects a `const char *` instead of a String.
vformat("My name is %s.", "Godette").c_str();
Comment on lines -57 to -60
Copy link
Member

@Calinou Calinou Oct 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would readd it in its current forrm, i.e. replace .c_str() with .utf8().get_data().

I know that personally, I was looking for this all the time when I started contributing to Godot 🙂 It's the same when I contribute to other open source projects in C++.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

honestly I agree, since it would help with interoperability with older apis if the user so wishes to use them,

I'll go run a check if it works properly and probably push the change if the .utf8().get_data() thing works.


In most cases, try to use ``vformat()`` instead of string concatenation as it
makes for more readable code.

Expand Down