X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cd0b170911637899ac3c126367ee5821f357c185..eb17eaba370e68c2c59f29e4e20de979bf4655f2:/docs/latex/wx/wxstring.tex diff --git a/docs/latex/wx/wxstring.tex b/docs/latex/wx/wxstring.tex index 2427335159..0f28c18abd 100644 --- a/docs/latex/wx/wxstring.tex +++ b/docs/latex/wx/wxstring.tex @@ -152,8 +152,22 @@ converted to a number. \membersection{Writing values into the string} Both formatted versions (\helpref{Printf}{wxstringprintf}) and stream-like -insertion operators exist (for basic types only). +insertion operators exist (for basic types only). Additionally, the +\helpref{Format}{wxstringformat} function allows to use simply append +formatted value to a string: +\begin{verbatim} + // the following 2 snippets are equivalent + + wxString s = "..."; + s += wxString::Format("%d", n); + + wxString s; + s.Printf("...%d", n); +\end{verbatim} + +\helpref{Format}{wxstringformat}\\ +\helpref{FormatV}{wxstringformatv}\\ \helpref{Printf}{wxstringprintf}\\ \helpref{PrintfV}{wxstringprintfv}\\ \helpref{operator \cinsert}{wxstringoperatorout} @@ -559,6 +573,28 @@ Searches for the given string. Returns the starting index, or -1 if not found. Returns the first occurrence of the item. +\membersection{wxString::Format}\label{wxstringformat} + +\func{static wxString}{Format}{\param{const wxChar }{*format}, \param{}{...}} + +This static function returns the string containing the result of calling +\helpref{Printf}{wxstringprintf} with the passed parameters on it. + +\wxheading{See also} + +\helpref{FormatV}{wxstringformatv}, \helpref{Printf}{wxstringprintf} + +\membersection{wxString::FormatV}\label{wxstringformatv} + +\func{static wxString}{Format}{\param{const wxChar }{*format}, \param{va\_list }{argptr}} + +This static function returns the string containing the result of calling +\helpref{PrintfV}{wxstringprintfv} with the passed parameters on it. + +\wxheading{See also} + +\helpref{Format}{wxstringformat}, \helpref{PrintfV}{wxstringprintfv} + \membersection{wxString::Freq}\label{wxstringfreq} \constfunc{int}{Frec}{\param{char }{ch}} @@ -845,7 +881,7 @@ Same as \helpref{Mid}{wxstringmid}. \membersection{wxString::ToDouble}\label{wxstringtodouble} -\cosntfunc{bool}{To}{\param{double}{ *val}} +\constfunc{bool}{To}{\param{double}{ *val}} Attempts to convert the string to a floating point number. Returns TRUE on suceess (the number is stored in the location pointed to by {\it val}) or FALSE @@ -853,7 +889,7 @@ if the string does not represent such number. \membersection{wxString::ToLong}\label{wxstringtolong} -\cosntfunc{bool}{To}{\param{long}{ *val}} +\constfunc{bool}{To}{\param{long}{ *val}} Attempts to convert the string to a signed integer. Returns TRUE on suceess (the number is stored in the location pointed to by {\it val}) or FALSE if the @@ -861,7 +897,7 @@ string does not represent such number. \membersection{wxString::ToULong}\label{wxstringtoulong} -\cosntfunc{bool}{To}{\param{unsigned long}{ *val}} +\constfunc{bool}{To}{\param{unsigned long}{ *val}} Attempts to convert the string to an unsigned integer. Returns TRUE on suceess (the number is stored in the location pointed to by {\it val}) or FALSE if the