X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3affcd078b1dc6d92cd06f18b5cc4c41a33161ea..dba7934c9d1b520ff7b48cd0d80cc52f8be6a052:/docs/latex/wx/wxstring.tex diff --git a/docs/latex/wx/wxstring.tex b/docs/latex/wx/wxstring.tex index 40305dd472..1ed930cc20 100644 --- a/docs/latex/wx/wxstring.tex +++ b/docs/latex/wx/wxstring.tex @@ -897,6 +897,19 @@ Prepends {\it str} to this string, returning a reference to this string. Similar to the standard function {\it sprintf()}. Returns the number of characters written, or an integer less than zero on error. +Note that if {\tt wxUSE_PRINTF_POS_PARAMS} is set to 1, then this function supports +Unix98-style positional parameters: + +\begin{verbatim} + 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" +\end{verbatim} + {\bf NB:} This function will use a safe version of {\it vsprintf()} (usually called {\it vsnprintf()}) whenever available to always allocate the buffer of correct size. Unfortunately, this function is not available on all platforms and the