Răsfoiți Sursa

Merge pull request #11339 from Paperomo/update-common_engine_methods_and_macros.rst

Update common_engine_methods_and_macros.rst
Paperomo 1 lună în urmă
părinte
comite
c1e142615d

+ 1 - 1
engine_details/architecture/common_engine_methods_and_macros.rst

@@ -57,7 +57,7 @@ in a way similar to C's ``sprintf()``:
     // Converts the resulting String into a `const char *`.
     // Converts the resulting String into a `const char *`.
     // You may need to do this if passing the result as an argument
     // 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.
     // to a method that expects a `const char *` instead of a String.
-    vformat("My name is %s.", "Godette").c_str();
+    vformat("My name is %s.", "Godette").utf8().get_data();
 
 
 In most cases, try to use ``vformat()`` instead of string concatenation as it
 In most cases, try to use ``vformat()`` instead of string concatenation as it
 makes for more readable code.
 makes for more readable code.