I tried this:
godot::String str = "values: %f,%f"; double a = 1.0; double b = 2.0; str = str % a % b; Result string is:
"not all arguments converted during string formatting" Documentation completely ignores that C++ exists and suggests the following GDScript:
var format_string = "%s was reluctant to learn %s, but now he enjoys it." var actual_string = format_string % ["Estragon", "GDScript"] print(actual_string) The equivalent of this in C++ would be:
str = str % std::tuple(a, b); But there is no operator for std tuple.
How can I format multiple values into godot string?