]> git.saurik.com Git - wxWidgets.git/commitdiff
Restore wxString::Printf() example showing position parameters in the docs.
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 12 May 2010 08:18:17 +0000 (08:18 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 12 May 2010 08:18:17 +0000 (08:18 +0000)
The example was lost during the translation of the manual to Doxygen.

Closes #12038.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64294 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

interface/wx/string.h

index dc82130d2acb0485883f9534362ba657ae86abc3..90ee7d718f7beb42602d354e1eb6db2778006665 100644 (file)
@@ -1088,6 +1088,16 @@ public:
         Note that if @c wxUSE_PRINTF_POS_PARAMS is set to 1, then this function supports
         Unix98-style positional parameters:
 
+        @code
+        wxString str;
+
+        str.Printf(wxT("%d %d %d"), 1, 2, 3);
+        // str now contains "1 2 3"
+
+        str.Printf(wxT("%2$d %3$d %1$d"), 1, 2, 3);
+        // str now contains "2 3 1"
+        @endcode
+
         @note This function will use a safe version of @e vsprintf() (usually called
         @e vsnprintf()) whenever available to always allocate the buffer of correct
         size. Unfortunately, this function is not available on all platforms and the