Bug Summary

File:usr/include/wx-3.2/wx/string.h
Warning:line 4388, column 43
Attempt to delete released memory

Annotated Source Code

Press '?' to see keyboard shortcuts

clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name StringFunctions.cpp -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=cplusplus -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/src/libs/common -fcoverage-compilation-dir=/rootdir/src/libs/common -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I ../../.. -D USE_WX_EXTENSIONS -D HAVE_BFD -I /usr/lib/x86_64-linux-gnu/wx/include/gtk3-unicode-3.2 -I /usr/include/wx-3.2 -D _FILE_OFFSET_BITS=64 -D WXUSINGDLL -D __WXGTK__ -D wxUSE_GUI=0 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/x86_64-linux-gnu/c++/14 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/backward -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -Wno-register -fdeprecated-macro -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -fcxx-exceptions -fexceptions -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2025-01-17-082348-14898-1 -x c++ StringFunctions.cpp

StringFunctions.cpp

1//
2// This file is part of the aMule Project.
3//
4// Copyright (c) 2004-2011 Angel Vidal ( kry@amule.org )
5// Copyright (c) 2003-2011 aMule Team ( admin@amule.org / http://www.amule.org )
6//
7// Any parts of this program derived from the xMule, lMule or eMule project,
8// or contributed by third-party developers are copyrighted by their
9// respective authors.
10//
11// This program is free software; you can redistribute it and/or modify
12// it under the terms of the GNU General Public License as published by
13// the Free Software Foundation; either version 2 of the License, or
14// (at your option) any later version.
15//
16// This program is distributed in the hope that it will be useful,
17// but WITHOUT ANY WARRANTY; without even the implied warranty of
18// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19// GNU General Public License for more details.
20//
21// You should have received a copy of the GNU General Public License
22// along with this program; if not, write to the Free Software
23// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
24//
25
26#include "StringFunctions.h"
27
28#include <wx/filename.h> // Needed for wxFileName
29#include <wx/uri.h> // Needed for wxURI
30
31#include <cstring> // Needed for std::strlen()
32
33// Implementation of the non-inlines
34
35//
36// Conversion of wxString so it can be used by printf() in a console
37// On some platforms (Windows) the console allows only "plain" characters,
38// so try to convert as much as possible and replace the others with '?'.
39// On other platforms (some Linux) wxConvLocal silently converts to UTF8
40// so the console can show even Chinese chars.
41//
42Unicode2CharBuf unicode2char(const wxChar* s)
43{
44 // First try the straight way.
45 Unicode2CharBuf buf1(wxConvLocalwxGet_wxConvLocal().cWX2MB(s));
46 if ((const char *) buf1) {
47 return buf1;
48 }
49 // Failed. Try to convert as much as possible.
50 size_t len = wxStrlen(s);
51 size_t maxlen = len * 4; // Allow for an encoding of up to 4 byte per char.
52 wxCharBuffer buf(maxlen + 1); // This is wasteful, but the string is used temporary anyway.
53 char * data = buf.data();
54 for (size_t i = 0, pos = 0; i < len; i++) {
55 size_t len_char = wxConvLocalwxGet_wxConvLocal().FromWChar(data + pos, maxlen - pos, s + i, 1);
56 if (len_char != wxCONV_FAILED((size_t)-1)) {
57 pos += len_char - 1;
58 } else if (pos < maxlen) {
59 data[pos++] = '?';
60 data[pos] = 0;
61 }
62 }
63 return buf;
64}
65
66
67static uint8_t base16Chars[17] = "0123456789ABCDEF";
68
69wxString URLEncode(const wxString& sIn)
70{
71 wxString sOut;
72
73 for ( unsigned int i = 0; i < sIn.Length(); ++i ) {
74 unsigned char curChar = sIn.GetChar( i );
75
76 if ( isalnum( curChar ) ) {
77 sOut += curChar;
78 } else if( isspace ( curChar ) ) {
79 sOut += wxT("+")L"+";
80 } else {
81 sOut += wxT("%")L"%";
82 sOut += base16Chars[ curChar >> 4];
83 sOut += base16Chars[ curChar & 0xf];
84 }
85
86 }
87
88 return sOut;
89}
90
91
92wxChar HexToDec( const wxString& hex )
93{
94 wxChar result = 0;
95 wxString str = hex.Upper();
96
97 for ( size_t i = 0; i < str.Len(); ++i ) {
98 result *= 16;
99 wxChar cur = str.GetChar(i);
100
101 if ( isdigit( cur ) ) {
102 result += cur - wxT('0')L'0';
103 } else if ( cur >= wxT('A')L'A' && cur <= wxT('F')L'F' ) {
104 result += cur - wxT('A')L'A' + 10;
105 } else {
106 return wxT('\0')L'\0';
107 }
108 }
109
110 return result;
111}
112
113
114wxString UnescapeHTML(const wxString& str)
115{
116 wxWritableCharBuffer buf = str.char_str(wxConvUTF8wxGet_wxConvUTF8());
117
118 // Work around wxWritableCharBuffer's operator[] not being writable
119 char *buffer = (char *)buf;
120
121 size_t len = std::strlen(buffer);
122 size_t j = 0;
123 for (size_t i = 0; i < len; ++i, ++j) {
124 if (buffer[i] == '%' && (len > i + 2)) {
125 wxChar unesc = HexToDec(str.Mid(i + 1, 2));
126 if (unesc) {
127 i += 2;
128 buffer[j] = (char)unesc;
129 } else {
130 // If conversion failed, then we just add the escape-code
131 // and continue past it like nothing happened.
132 buffer[j] = buffer[i];
133 }
134 } else {
135 buffer[j] = buffer[i];
136 }
137 }
138 buffer[j] = '\0';
139
140 // Try to interpret the result as UTF-8
141 wxString result(buffer, wxConvUTF8wxGet_wxConvUTF8());
142 if (len > 0 && result.length() == 0) {
143 // Fall back to ISO-8859-1
144 result = wxString(buffer, wxConvISO8859_1wxGet_wxConvISO8859_1());
145 }
146
147 return result;
148}
149
150
151wxString validateURI(const wxString& url)
152{
153 wxURI uri(url);
154
155 return uri.BuildURI();
156}
157
158
159enum ECharType {
160 ECTInteger,
161 ECTText,
162 ECTNone
163};
164
165inline wxString GetNextField(const wxString& str, size_t& cookie)
166{
167 // These are taken to separate "fields"
168 static const wxChar* s_delims = wxT("\t\n\x0b\x0c\r !\"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~")L"\t\n\x0b\x0c\r !\"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~";
169
170 wxString field;
171 ECharType curType = ECTNone;
172 for (; cookie < str.Length(); ++cookie) {
173 wxChar c = str[cookie];
174
175 if ((c >= wxT('0')L'0') && (c <= wxT('9')L'9')) {
176 if (curType == ECTText) {
177 break;
178 }
179
180 curType = ECTInteger;
181 field += c;
182 } else if (wxStrchr(s_delims, c)) {
183 if (curType == ECTNone) {
184 continue;
185 } else {
186 break;
187 }
188 } else {
189 if (curType == ECTInteger) {
190 break;
191 }
192
193 curType = ECTText;
194 field += c;
195 }
196 }
197
198 return field;
199}
200
201
202int FuzzyStrCmp(const wxString& a, const wxString& b)
203{
204 size_t aCookie = 0, bCookie = 0;
205 wxString aField, bField;
206
207 do {
208 aField = GetNextField(a, aCookie);
209 bField = GetNextField(b, bCookie);
210
211 if (aField.IsNumber() && bField.IsNumber()) {
212 unsigned long aInteger = StrToULong(aField);
213 unsigned long bInteger = StrToULong(bField);
214
215 if (aInteger < bInteger) {
216 return -1;
217 } else if (aInteger > bInteger) {
218 return 1;
219 }
220 } else if (aField < bField) {
221 return -1;
222 } else if (aField > bField) {
223 return 1;
224 }
225 } while (!aField.IsEmpty() && !bField.IsEmpty());
226
227 return 0;
228}
229
230
231int FuzzyStrCaseCmp(const wxString& a, const wxString& b)
232{
233 return FuzzyStrCmp(a.Lower(), b.Lower());
234}
235
236
237
238CSimpleTokenizer::CSimpleTokenizer(const wxString& str, wxChar token)
239 : m_string(str),
240 m_delim(token),
241 m_ptr(m_string.c_str()),
242 m_count(0)
243{
244}
245
246
247wxString CSimpleTokenizer::next()
248{
249 const wxChar* start = m_ptr;
250 const wxChar* end = m_string.c_str() + m_string.Len() + 1;
1
Calling '~wxCStrData'
5
Returning from '~wxCStrData'
6
Calling '~wxCStrData'
251
252 for (; m_ptr < end; ++m_ptr) {
253 if (*m_ptr == m_delim) {
254 m_count++;
255 break;
256 }
257 }
258
259 // Return the token
260 return m_string.Mid(start - m_string.c_str(), m_ptr++ - start);
261}
262
263
264wxString CSimpleTokenizer::remaining() const
265{
266 return m_string.Mid(m_ptr - m_string.c_str());
267}
268
269
270size_t CSimpleTokenizer::tokenCount() const
271{
272 return m_count;
273}

/usr/include/wx-3.2/wx/string.h

1///////////////////////////////////////////////////////////////////////////////
2// Name: wx/string.h
3// Purpose: wxString class
4// Author: Vadim Zeitlin
5// Modified by:
6// Created: 29/01/98
7// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
8// Licence: wxWindows licence
9///////////////////////////////////////////////////////////////////////////////
10
11/*
12 Efficient string class [more or less] compatible with MFC CString,
13 wxWidgets version 1 wxString and std::string and some handy functions
14 missing from string.h.
15*/
16
17#ifndef _WX_WXSTRING_H__
18#define _WX_WXSTRING_H__
19
20// ----------------------------------------------------------------------------
21// headers
22// ----------------------------------------------------------------------------
23
24#include "wx/defs.h" // everybody should include this
25
26#if defined(__WXMAC__)
27 #include <ctype.h>
28#endif
29
30#include <string.h>
31#include <stdio.h>
32#include <stdarg.h>
33#include <limits.h>
34#include <stdlib.h>
35
36#include "wx/wxcrtbase.h" // for wxChar, wxStrlen() etc.
37#include "wx/strvararg.h"
38#include "wx/buffer.h" // for wxCharBuffer
39#include "wx/strconv.h" // for wxConvertXXX() macros and wxMBConv classes
40#include "wx/stringimpl.h"
41#include "wx/stringops.h"
42#include "wx/unichar.h"
43
44// by default we cache the mapping of the positions in UTF-8 string to the byte
45// offset as this results in noticeable performance improvements for loops over
46// strings using indices; comment out this line to disable this
47//
48// notice that this optimization is well worth using even in debug builds as it
49// changes asymptotic complexity of algorithms using indices to iterate over
50// wxString back to expected linear from quadratic
51//
52// also notice that wxTLS_TYPE() (__declspec(thread) in this case) is unsafe to
53// use in DLL build under pre-Vista Windows so we disable this code for now, if
54// anybody really needs to use UTF-8 build under Windows with this optimization
55// it would have to be re-tested and probably corrected
56// CS: under OSX release builds the string destructor/cache cleanup sometimes
57// crashes, disable until we find the true reason or a better workaround
58#if wxUSE_UNICODE_UTF80 && !defined(__WINDOWS__) && !defined(__WXOSX__)
59 #define wxUSE_STRING_POS_CACHE0 1
60#else
61 #define wxUSE_STRING_POS_CACHE0 0
62#endif
63
64#if wxUSE_STRING_POS_CACHE0
65 #include "wx/tls.h"
66
67 // change this 0 to 1 to enable additional (very expensive) asserts
68 // verifying that string caching logic works as expected
69 #if 0
70 #define wxSTRING_CACHE_ASSERT(cond) wxASSERT(cond)do { if ( cond ) { } else if ( wxTheAssertHandler && (
wxOnAssert("/usr/include/wx-3.2/wx/string.h", 70, __FUNCTION__
, "cond", (const char*)__null), wxTrapInAssert) ) { wxTrapInAssert
= false; asm volatile ("int $3"); } } while ( (void)0, 0 )
71 #else
72 #define wxSTRING_CACHE_ASSERT(cond)
73 #endif
74#endif // wxUSE_STRING_POS_CACHE
75
76class WXDLLIMPEXP_FWD_BASE wxString;
77
78// unless this symbol is predefined to disable the compatibility functions, do
79// use them
80#ifndef WXWIN_COMPATIBILITY_STRING_PTR_AS_ITER1
81 #define WXWIN_COMPATIBILITY_STRING_PTR_AS_ITER1 1
82#endif
83
84// enforce consistency among encoding-related macros
85#ifdef wxNO_IMPLICIT_WXSTRING_ENCODING
86
87#ifndef wxNO_UNSAFE_WXSTRING_CONV
88#define wxNO_UNSAFE_WXSTRING_CONV
89#endif
90
91#if wxUSE_UTF8_LOCALE_ONLY0
92#error wxNO_IMPLICIT_WXSTRING_ENCODING cannot be used in UTF-8 only builds
93#endif
94
95#endif
96
97namespace wxPrivate
98{
99 template <typename T> struct wxStringAsBufHelper;
100}
101
102// ---------------------------------------------------------------------------
103// macros
104// ---------------------------------------------------------------------------
105
106// Shorthand for instantiating ASCII strings
107#define wxASCII_STR(s)wxString::FromAscii(s) wxString::FromAscii(s)
108
109// These macros are not used by wxWidgets itself any longer and are only
110// preserved for compatibility with the user code that might be still using
111// them. Do _not_ use them in the new code, just use const_cast<> instead.
112#define WXSTRINGCAST(wxChar *)(const wxChar *) (wxChar *)(const wxChar *)
113#define wxCSTRINGCAST(wxChar *)(const wxChar *) (wxChar *)(const wxChar *)
114#define wxMBSTRINGCAST(char *)(const char *) (char *)(const char *)
115#define wxWCSTRINGCAST(wchar_t *)(const wchar_t *) (wchar_t *)(const wchar_t *)
116
117// ----------------------------------------------------------------------------
118// constants
119// ----------------------------------------------------------------------------
120
121// ---------------------------------------------------------------------------
122// global functions complementing standard C string library replacements for
123// strlen() and portable strcasecmp()
124//---------------------------------------------------------------------------
125
126#if WXWIN_COMPATIBILITY_2_80
127// Use wxXXX() functions from wxcrt.h instead! These functions are for
128// backwards compatibility only.
129
130// checks whether the passed in pointer is NULL and if the string is empty
131wxDEPRECATED_MSG("use wxIsEmpty() instead")__attribute__((deprecated("use wxIsEmpty() instead")))
132inline bool IsEmpty(const char *p) { return (!p || !*p); }
133
134// safe version of strlen() (returns 0 if passed NULL pointer)
135wxDEPRECATED_MSG("use wxStrlen() instead")__attribute__((deprecated("use wxStrlen() instead")))
136inline size_t Strlen(const char *psz)
137 { return psz ? strlen(psz) : 0; }
138
139// portable strcasecmp/_stricmp
140wxDEPRECATED_MSG("use wxStricmp() instead")__attribute__((deprecated("use wxStricmp() instead")))
141inline int Stricmp(const char *psz1, const char *psz2)
142 { return wxCRT_StricmpAstrcasecmp(psz1, psz2); }
143
144#endif // WXWIN_COMPATIBILITY_2_8
145
146// ----------------------------------------------------------------------------
147// wxCStrData
148// ----------------------------------------------------------------------------
149
150// Lightweight object returned by wxString::c_str() and implicitly convertible
151// to either const char* or const wchar_t*.
152class wxCStrData
153{
154private:
155 // Ctors; for internal use by wxString and wxCStrData only
156 wxCStrData(const wxString *str, size_t offset = 0, bool owned = false)
157 : m_str(str), m_offset(offset), m_owned(owned) {}
158
159public:
160 // Ctor constructs the object from char literal; they are needed to make
161 // operator?: compile and they intentionally take char*, not const char*
162#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
163 inline wxCStrData(char *buf);
164#endif
165 inline wxCStrData(wchar_t *buf);
166 inline wxCStrData(const wxCStrData& data);
167
168 inline ~wxCStrData();
169
170 // AsWChar() and AsChar() can't be defined here as they use wxString and so
171 // must come after it and because of this won't be inlined when called from
172 // wxString methods (without a lot of work to extract these wxString methods
173 // from inside the class itself). But we still define them being inline
174 // below to let compiler inline them from elsewhere. And because of this we
175 // must declare them as inline here because otherwise some compilers give
176 // warnings about them, e.g. mingw32 3.4.5 warns about "<symbol> defined
177 // locally after being referenced with dllimport linkage" while IRIX
178 // mipsPro 7.4 warns about "function declared inline after being called".
179 inline const wchar_t* AsWChar() const;
180 operator const wchar_t*() const { return AsWChar(); }
181
182#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
183 inline const char* AsChar() const;
184 const unsigned char* AsUnsignedChar() const
185 { return (const unsigned char *) AsChar(); }
186 operator const char*() const { return AsChar(); }
187 operator const unsigned char*() const { return AsUnsignedChar(); }
188
189 operator const void*() const { return AsChar(); }
190
191 // returns buffers that are valid as long as the associated wxString exists
192 const wxScopedCharBuffer AsCharBuf() const
193 {
194 return wxScopedCharBuffer::CreateNonOwned(AsChar());
195 }
196#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
197
198 const wxScopedWCharBuffer AsWCharBuf() const
199 {
200 return wxScopedWCharBuffer::CreateNonOwned(AsWChar());
201 }
202
203 inline wxString AsString() const;
204
205 // returns the value as C string in internal representation (equivalent
206 // to AsString().wx_str(), but more efficient)
207 const wxStringCharType *AsInternal() const;
208
209 // allow expressions like "c_str()[0]":
210 inline wxUniChar operator[](size_t n) const;
211 wxUniChar operator[](int n) const { return operator[](size_t(n)); }
212 wxUniChar operator[](long n) const { return operator[](size_t(n)); }
213#ifndef wxSIZE_T_IS_UINT
214 wxUniChar operator[](unsigned int n) const { return operator[](size_t(n)); }
215#endif // size_t != unsigned int
216
217 // These operators are needed to emulate the pointer semantics of c_str():
218 // expressions like "wxChar *p = str.c_str() + 1;" should continue to work
219 // (we need both versions to resolve ambiguities). Note that this means
220 // the 'n' value is interpreted as addition to char*/wchar_t* pointer, it
221 // is *not* number of Unicode characters in wxString.
222 wxCStrData operator+(int n) const
223 { return wxCStrData(m_str, m_offset + n, m_owned); }
224 wxCStrData operator+(long n) const
225 { return wxCStrData(m_str, m_offset + n, m_owned); }
226 wxCStrData operator+(size_t n) const
227 { return wxCStrData(m_str, m_offset + n, m_owned); }
228
229 // and these for "str.c_str() + (p2 - p1)" (it also works for any integer
230 // expression but it must be ptrdiff_t and not e.g. int to work in this
231 // example):
232 wxCStrData operator-(ptrdiff_t n) const
233 {
234 wxASSERT_MSG( n <= (ptrdiff_t)m_offset,do { if ( n <= (ptrdiff_t)m_offset ) { } else if ( wxTheAssertHandler
&& (wxOnAssert("/usr/include/wx-3.2/wx/string.h", 235
, __FUNCTION__, "n <= (ptrdiff_t)m_offset", L"attempt to construct address before the beginning of the string"
), wxTrapInAssert) ) { wxTrapInAssert = false; asm volatile (
"int $3"); } } while ( (void)0, 0 )
235 wxT("attempt to construct address before the beginning of the string") )do { if ( n <= (ptrdiff_t)m_offset ) { } else if ( wxTheAssertHandler
&& (wxOnAssert("/usr/include/wx-3.2/wx/string.h", 235
, __FUNCTION__, "n <= (ptrdiff_t)m_offset", L"attempt to construct address before the beginning of the string"
), wxTrapInAssert) ) { wxTrapInAssert = false; asm volatile (
"int $3"); } } while ( (void)0, 0 )
;
236 return wxCStrData(m_str, m_offset - n, m_owned);
237 }
238
239 // this operator is needed to make expressions like "*c_str()" or
240 // "*(c_str() + 2)" work
241 inline wxUniChar operator*() const;
242
243private:
244 // the wxString this object was returned for
245 const wxString *m_str;
246 // Offset into c_str() return value. Note that this is *not* offset in
247 // m_str in Unicode characters. Instead, it is index into the
248 // char*/wchar_t* buffer returned by c_str(). It's interpretation depends
249 // on how is the wxCStrData instance used: if it is eventually cast to
250 // const char*, m_offset will be in bytes form string's start; if it is
251 // cast to const wchar_t*, it will be in wchar_t values.
252 size_t m_offset;
253 // should m_str be deleted, i.e. is it owned by us?
254 bool m_owned;
255
256 friend class WXDLLIMPEXP_FWD_BASE wxString;
257};
258
259// ----------------------------------------------------------------------------
260// wxString: string class trying to be compatible with std::string, MFC
261// CString and wxWindows 1.x wxString all at once
262// ---------------------------------------------------------------------------
263
264#if wxUSE_UNICODE_UTF80
265// see the comment near wxString::iterator for why we need this
266class WXDLLIMPEXP_BASE__attribute__ ((visibility("default"))) wxStringIteratorNode
267{
268public:
269 wxStringIteratorNode()
270 : m_str(NULL__null), m_citer(NULL__null), m_iter(NULL__null), m_prev(NULL__null), m_next(NULL__null) {}
271 wxStringIteratorNode(const wxString *str,
272 wxStringImpl::const_iterator *citer)
273 { DoSet(str, citer, NULL__null); }
274 wxStringIteratorNode(const wxString *str, wxStringImpl::iterator *iter)
275 { DoSet(str, NULL__null, iter); }
276 ~wxStringIteratorNode()
277 { clear(); }
278
279 inline void set(const wxString *str, wxStringImpl::const_iterator *citer)
280 { clear(); DoSet(str, citer, NULL__null); }
281 inline void set(const wxString *str, wxStringImpl::iterator *iter)
282 { clear(); DoSet(str, NULL__null, iter); }
283
284 const wxString *m_str;
285 wxStringImpl::const_iterator *m_citer;
286 wxStringImpl::iterator *m_iter;
287 wxStringIteratorNode *m_prev, *m_next;
288
289private:
290 inline void clear();
291 inline void DoSet(const wxString *str,
292 wxStringImpl::const_iterator *citer,
293 wxStringImpl::iterator *iter);
294
295 // the node belongs to a particular iterator instance, it's not copied
296 // when a copy of the iterator is made
297 wxDECLARE_NO_COPY_CLASS(wxStringIteratorNode)private: wxStringIteratorNode(const wxStringIteratorNode&
) = delete; wxStringIteratorNode& operator=(const wxStringIteratorNode
&) = delete
;
298};
299#endif // wxUSE_UNICODE_UTF8
300
301class WXDLLIMPEXP_BASE__attribute__ ((visibility("default"))) wxString
302{
303 // NB: special care was taken in arranging the member functions in such order
304 // that all inline functions can be effectively inlined, verify that all
305 // performance critical functions are still inlined if you change order!
306public:
307 // an 'invalid' value for string index, moved to this place due to a CW bug
308 static const size_t npos;
309
310private:
311 // if we hadn't made these operators private, it would be possible to
312 // compile "wxString s; s = 17;" without any warnings as 17 is implicitly
313 // converted to char in C and we do have operator=(char)
314 //
315 // NB: we don't need other versions (short/long and unsigned) as attempt
316 // to assign another numeric type to wxString will now result in
317 // ambiguity between operator=(char) and operator=(int)
318 wxString& operator=(int);
319
320 // these methods are not implemented - there is _no_ conversion from int to
321 // string, you're doing something wrong if the compiler wants to call it!
322 //
323 // try `s << i' or `s.Printf(wxASCII_STR("%d"), i)' instead
324 wxString(int);
325
326#ifdef wxNO_IMPLICIT_WXSTRING_ENCODING
327 // These constructors are disabled because the encoding must be explicit
328 explicit wxString(const char *psz);
329 explicit wxString(const char *psz, size_t nLength);
330 explicit wxString(const unsigned char *psz);
331 explicit wxString(const unsigned char *psz, size_t nLength);
332#endif
333
334 // buffer for holding temporary substring when using any of the methods
335 // that take (char*,size_t) or (wchar_t*,size_t) arguments:
336 template<typename T>
337 struct SubstrBufFromType
338 {
339 T data;
340 size_t len;
341
342 SubstrBufFromType(const T& data_, size_t len_)
343 : data(data_), len(len_)
344 {
345 wxASSERT_MSG( len != npos, "must have real length" )do { if ( len != npos ) { } else if ( wxTheAssertHandler &&
(wxOnAssert("/usr/include/wx-3.2/wx/string.h", 345, __FUNCTION__
, "len != npos", "must have real length"), wxTrapInAssert) ) {
wxTrapInAssert = false; asm volatile ("int $3"); } } while (
(void)0, 0 )
;
346 }
347 };
348
349#if wxUSE_UNICODE_UTF80
350 // even char* -> char* needs conversion, from locale charset to UTF-8
351 typedef SubstrBufFromType<wxScopedCharBuffer> SubstrBufFromWC;
352 typedef SubstrBufFromType<wxScopedCharBuffer> SubstrBufFromMB;
353#elif wxUSE_UNICODE_WCHAR1
354 typedef SubstrBufFromType<const wchar_t*> SubstrBufFromWC;
355 typedef SubstrBufFromType<wxScopedWCharBuffer> SubstrBufFromMB;
356#else
357 typedef SubstrBufFromType<const char*> SubstrBufFromMB;
358 typedef SubstrBufFromType<wxScopedCharBuffer> SubstrBufFromWC;
359#endif
360
361
362 // Functions implementing primitive operations on string data; wxString
363 // methods and iterators are implemented in terms of it. The differences
364 // between UTF-8 and wchar_t* representations of the string are mostly
365 // contained here.
366
367#if wxUSE_UNICODE_UTF80
368 static SubstrBufFromMB ConvertStr(const char *psz, size_t nLength,
369 const wxMBConv& conv);
370 static SubstrBufFromWC ConvertStr(const wchar_t *pwz, size_t nLength,
371 const wxMBConv& conv);
372#elif wxUSE_UNICODE_WCHAR1
373 static SubstrBufFromMB ConvertStr(const char *psz, size_t nLength,
374 const wxMBConv& conv);
375#else
376 static SubstrBufFromWC ConvertStr(const wchar_t *pwz, size_t nLength,
377 const wxMBConv& conv);
378#endif
379
380#if !wxUSE_UNICODE_UTF80 // wxUSE_UNICODE_WCHAR or !wxUSE_UNICODE
381 // returns C string encoded as the implementation expects:
382 #if wxUSE_UNICODE1
383 static const wchar_t* ImplStr(const wchar_t* str)
384 { return str ? str : wxT("")L""; }
385 static const SubstrBufFromWC ImplStr(const wchar_t* str, size_t n)
386 { return SubstrBufFromWC(str, (str && n == npos) ? wxWcslenwcslen(str) : n); }
387 static wxScopedWCharBuffer ImplStr(const char* str,
388 const wxMBConv& conv wxSTRING_DEFAULT_CONV_ARG= wxGet_wxConvLibc())
389 { return ConvertStr(str, npos, conv).data; }
390 static SubstrBufFromMB ImplStr(const char* str, size_t n,
391 const wxMBConv& conv wxSTRING_DEFAULT_CONV_ARG= wxGet_wxConvLibc())
392 { return ConvertStr(str, n, conv); }
393 #else
394 static const char* ImplStr(const char* str,
395 const wxMBConv& WXUNUSED(conv) wxSTRING_DEFAULT_CONV_ARG= wxGet_wxConvLibc())
396 { return str ? str : ""; }
397 static const SubstrBufFromMB ImplStr(const char* str, size_t n,
398 const wxMBConv& WXUNUSED(conv) wxSTRING_DEFAULT_CONV_ARG= wxGet_wxConvLibc())
399 { return SubstrBufFromMB(str, (str && n == npos) ? wxStrlen(str) : n); }
400#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
401 static wxScopedCharBuffer ImplStr(const wchar_t* str)
402 { return ConvertStr(str, npos, wxConvLibcwxGet_wxConvLibc()).data; }
403 static SubstrBufFromWC ImplStr(const wchar_t* str, size_t n)
404 { return ConvertStr(str, n, wxConvLibcwxGet_wxConvLibc()); }
405#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
406 #endif
407
408 // translates position index in wxString to/from index in underlying
409 // wxStringImpl:
410 static size_t PosToImpl(size_t pos) { return pos; }
411 static void PosLenToImpl(size_t pos, size_t len,
412 size_t *implPos, size_t *implLen)
413 { *implPos = pos; *implLen = len; }
414 static size_t LenToImpl(size_t len) { return len; }
415 static size_t PosFromImpl(size_t pos) { return pos; }
416
417 // we don't want to define these as empty inline functions as it could
418 // result in noticeable (and quite unnecessary in non-UTF-8 build) slowdown
419 // in debug build where the inline functions are not effectively inlined
420 #define wxSTRING_INVALIDATE_CACHE()
421 #define wxSTRING_INVALIDATE_CACHED_LENGTH()
422 #define wxSTRING_UPDATE_CACHED_LENGTH(n)
423 #define wxSTRING_SET_CACHED_LENGTH(n)
424
425#else // wxUSE_UNICODE_UTF8
426
427 static wxScopedCharBuffer ImplStr(const char* str,
428 const wxMBConv& conv wxSTRING_DEFAULT_CONV_ARG= wxGet_wxConvLibc())
429 { return ConvertStr(str, npos, conv).data; }
430 static SubstrBufFromMB ImplStr(const char* str, size_t n,
431 const wxMBConv& conv wxSTRING_DEFAULT_CONV_ARG= wxGet_wxConvLibc())
432 { return ConvertStr(str, n, conv); }
433
434 static wxScopedCharBuffer ImplStr(const wchar_t* str)
435 { return ConvertStr(str, npos, wxMBConvUTF8()).data; }
436 static SubstrBufFromWC ImplStr(const wchar_t* str, size_t n)
437 { return ConvertStr(str, n, wxMBConvUTF8()); }
438
439#if wxUSE_STRING_POS_CACHE0
440 // this is an extremely simple cache used by PosToImpl(): each cache element
441 // contains the string it applies to and the index corresponding to the last
442 // used position in this wxString in its m_impl string
443 //
444 // NB: notice that this struct (and nested Element one) must be a POD or we
445 // wouldn't be able to use a thread-local variable of this type, in
446 // particular it should have no ctor -- we rely on statics being
447 // initialized to 0 instead
448 struct Cache
449 {
450 enum { SIZE = 8 };
451
452 struct Element
453 {
454 const wxString *str; // the string to which this element applies
455 size_t pos, // the cached index in this string
456 impl, // the corresponding position in its m_impl
457 len; // cached length or npos if unknown
458
459 // reset cached index to 0
460 void ResetPos() { pos = impl = 0; }
461
462 // reset position and length
463 void Reset() { ResetPos(); len = npos; }
464 };
465
466 // cache the indices mapping for the last few string used
467 Element cached[SIZE];
468
469 // the last used index
470 unsigned lastUsed;
471 };
472
473#ifndef wxHAS_COMPILER_TLS
474 // we must use an accessor function and not a static variable when the TLS
475 // variables support is implemented in the library (and not by the compiler)
476 // because the global s_cache variable could be not yet initialized when a
477 // ctor of another global object is executed and if that ctor uses any
478 // wxString methods, bad things happen
479 //
480 // however notice that this approach does not work when compiler TLS is used,
481 // at least not with g++ 4.1.2 under amd64 as it apparently compiles code
482 // using this accessor incorrectly when optimizations are enabled (-O2 is
483 // enough) -- luckily we don't need it then either as static __thread
484 // variables are initialized by 0 anyhow then and so we can use the variable
485 // directly
486 WXEXPORT__attribute__ ((visibility("default"))) static Cache& GetCache()
487 {
488 static wxTLS_TYPE(Cache) s_cache;
489
490 return wxTLS_VALUE(s_cache);
491 }
492
493 // this helper struct is used to ensure that GetCache() is called during
494 // static initialization time, i.e. before any threads creation, as otherwise
495 // the static s_cache construction inside GetCache() wouldn't be MT-safe
496 friend struct wxStrCacheInitializer;
497#else // wxHAS_COMPILER_TLS
498 static wxTLS_TYPE(Cache) ms_cache;
499 static Cache& GetCache() { return wxTLS_VALUE(ms_cache); }
500#endif // !wxHAS_COMPILER_TLS/wxHAS_COMPILER_TLS
501
502 static Cache::Element *GetCacheBegin() { return GetCache().cached; }
503 static Cache::Element *GetCacheEnd() { return GetCacheBegin() + Cache::SIZE; }
504 static unsigned& LastUsedCacheElement() { return GetCache().lastUsed; }
505
506 // this is used in debug builds only to provide a convenient function,
507 // callable from a debugger, to show the cache contents
508 friend struct wxStrCacheDumper;
509
510 // uncomment this to have access to some profiling statistics on program
511 // termination
512 //#define wxPROFILE_STRING_CACHE
513
514#ifdef wxPROFILE_STRING_CACHE
515 static struct PosToImplCacheStats
516 {
517 unsigned postot, // total non-trivial calls to PosToImpl
518 poshits, // cache hits from PosToImpl()
519 mishits, // cached position beyond the needed one
520 sumpos, // sum of all positions, used to compute the
521 // average position after dividing by postot
522 sumofs, // sum of all offsets after using the cache, used to
523 // compute the average after dividing by hits
524 lentot, // number of total calls to length()
525 lenhits; // number of cache hits in length()
526 } ms_cacheStats;
527
528 friend struct wxStrCacheStatsDumper;
529
530 #define wxCACHE_PROFILE_FIELD_INC(field) ms_cacheStats.field++
531 #define wxCACHE_PROFILE_FIELD_ADD(field, val) ms_cacheStats.field += (val)
532#else // !wxPROFILE_STRING_CACHE
533 #define wxCACHE_PROFILE_FIELD_INC(field)
534 #define wxCACHE_PROFILE_FIELD_ADD(field, val)
535#endif // wxPROFILE_STRING_CACHE/!wxPROFILE_STRING_CACHE
536
537 // note: it could seem that the functions below shouldn't be inline because
538 // they are big, contain loops and so the compiler shouldn't be able to
539 // inline them anyhow, however moving them into string.cpp does decrease the
540 // code performance by ~5%, at least when using g++ 4.1 so do keep them here
541 // unless tests show that it's not advantageous any more
542
543 // return the pointer to the cache element for this string or NULL if not
544 // cached
545 Cache::Element *FindCacheElement() const
546 {
547 // profiling seems to show a small but consistent gain if we use this
548 // simple loop instead of starting from the last used element (there are
549 // a lot of misses in this function...)
550 Cache::Element * const cacheBegin = GetCacheBegin();
551#ifndef wxHAS_COMPILER_TLS
552 // during destruction tls calls may return NULL, in this case return NULL
553 // immediately without accessing anything else
554 if ( cacheBegin == NULL__null )
555 return NULL__null;
556#endif
557
558 // gcc 7 warns about not being able to optimize this loop because of
559 // possible loop variable overflow, really not sure what to do about
560 // this, so just disable this warnings for now
561 wxGCC_ONLY_WARNING_SUPPRESS(unsafe-loop-optimizations)
562
563 Cache::Element * const cacheEnd = GetCacheEnd();
564 for ( Cache::Element *c = cacheBegin; c != cacheEnd; c++ )
565 {
566 if ( c->str == this )
567 return c;
568 }
569
570 wxGCC_ONLY_WARNING_RESTORE(unsafe-loop-optimizations)
571
572 return NULL__null;
573 }
574
575 // unlike FindCacheElement(), this one always returns a valid pointer to the
576 // cache element for this string, it may have valid last cached position and
577 // its corresponding index in the byte string or not
578 Cache::Element *GetCacheElement() const
579 {
580 // gcc warns about cacheBegin and c inside the loop being possibly null,
581 // but this shouldn't actually be the case
582#if wxCHECK_GCC_VERSION(6,1)( ( 4 > (6) ) || ( 4 == (6) && 2 >= (1) ) )
583 wxGCC_ONLY_WARNING_SUPPRESS(null-dereference)
584#endif
585
586 Cache::Element * const cacheBegin = GetCacheBegin();
587 Cache::Element * const cacheEnd = GetCacheEnd();
588 Cache::Element * const cacheStart = cacheBegin + LastUsedCacheElement();
589
590 // check the last used first, this does no (measurable) harm for a miss
591 // but does help for simple loops addressing the same string all the time
592 if ( cacheStart->str == this )
593 return cacheStart;
594
595 // notice that we're going to check cacheStart again inside this call but
596 // profiling shows that it's still faster to use a simple loop like
597 // inside FindCacheElement() than manually looping with wrapping starting
598 // from the cache entry after the start one
599 Cache::Element *c = FindCacheElement();
600 if ( !c )
601 {
602 // claim the next cache entry for this string
603 c = cacheStart;
604 if ( ++c == cacheEnd )
605 c = cacheBegin;
606
607 c->str = this;
608 c->Reset();
609
610 // and remember the last used element
611 LastUsedCacheElement() = static_cast<unsigned int>(c - cacheBegin);
612 }
613
614 return c;
615
616#if wxCHECK_GCC_VERSION(6,1)( ( 4 > (6) ) || ( 4 == (6) && 2 >= (1) ) )
617 wxGCC_ONLY_WARNING_RESTORE(null-dereference)
618#endif
619 }
620
621 size_t DoPosToImpl(size_t pos) const
622 {
623 wxCACHE_PROFILE_FIELD_INC(postot);
624
625 // NB: although the case of pos == 1 (and offset from cached position
626 // equal to 1) are common, nothing is gained by writing special code
627 // for handling them, the compiler (at least g++ 4.1 used) seems to
628 // optimize the code well enough on its own
629
630 wxCACHE_PROFILE_FIELD_ADD(sumpos, pos);
631
632 Cache::Element * const cache = GetCacheElement();
633
634 // cached position can't be 0 so if it is, it means that this entry was
635 // used for length caching only so far, i.e. it doesn't count as a hit
636 // from our point of view
637 if ( cache->pos )
638 {
639 wxCACHE_PROFILE_FIELD_INC(poshits);
640 }
641
642 if ( pos == cache->pos )
643 return cache->impl;
644
645 // this seems to happen only rarely so just reset the cache in this case
646 // instead of complicating code even further by seeking backwards in this
647 // case
648 if ( cache->pos > pos )
649 {
650 wxCACHE_PROFILE_FIELD_INC(mishits);
651
652 cache->ResetPos();
653 }
654
655 wxCACHE_PROFILE_FIELD_ADD(sumofs, pos - cache->pos);
656
657
658 wxStringImpl::const_iterator i(m_impl.begin() + cache->impl);
659 for ( size_t n = cache->pos; n < pos; n++ )
660 wxStringOperations::IncIter(i);
661
662 cache->pos = pos;
663 cache->impl = i - m_impl.begin();
664
665 wxSTRING_CACHE_ASSERT(
666 (int)cache->impl == (begin() + pos).impl() - m_impl.begin() );
667
668 return cache->impl;
669 }
670
671 void InvalidateCache()
672 {
673 Cache::Element * const cache = FindCacheElement();
674 if ( cache )
675 cache->Reset();
676 }
677
678 void InvalidateCachedLength()
679 {
680 Cache::Element * const cache = FindCacheElement();
681 if ( cache )
682 cache->len = npos;
683 }
684
685 void SetCachedLength(size_t len)
686 {
687 // we optimistically cache the length here even if the string wasn't
688 // present in the cache before, this seems to do no harm and the
689 // potential for avoiding length recomputation for long strings looks
690 // interesting
691 GetCacheElement()->len = len;
692 }
693
694 void UpdateCachedLength(ptrdiff_t delta)
695 {
696 Cache::Element * const cache = FindCacheElement();
697 if ( cache && cache->len != npos )
698 {
699 wxSTRING_CACHE_ASSERT( (ptrdiff_t)cache->len + delta >= 0 );
700
701 cache->len += delta;
702 }
703 }
704
705 #define wxSTRING_INVALIDATE_CACHE() InvalidateCache()
706 #define wxSTRING_INVALIDATE_CACHED_LENGTH() InvalidateCachedLength()
707 #define wxSTRING_UPDATE_CACHED_LENGTH(n) UpdateCachedLength(n)
708 #define wxSTRING_SET_CACHED_LENGTH(n) SetCachedLength(n)
709#else // !wxUSE_STRING_POS_CACHE
710 size_t DoPosToImpl(size_t pos) const
711 {
712 return (begin() + pos).impl() - m_impl.begin();
713 }
714
715 #define wxSTRING_INVALIDATE_CACHE()
716 #define wxSTRING_INVALIDATE_CACHED_LENGTH()
717 #define wxSTRING_UPDATE_CACHED_LENGTH(n)
718 #define wxSTRING_SET_CACHED_LENGTH(n)
719#endif // wxUSE_STRING_POS_CACHE/!wxUSE_STRING_POS_CACHE
720
721 size_t PosToImpl(size_t pos) const
722 {
723 return pos == 0 || pos == npos ? pos : DoPosToImpl(pos);
724 }
725
726 void PosLenToImpl(size_t pos, size_t len, size_t *implPos, size_t *implLen) const;
727
728 size_t LenToImpl(size_t len) const
729 {
730 size_t pos, len2;
731 PosLenToImpl(0, len, &pos, &len2);
732 return len2;
733 }
734
735 size_t PosFromImpl(size_t pos) const
736 {
737 if ( pos == 0 || pos == npos )
738 return pos;
739 else
740 return const_iterator(this, m_impl.begin() + pos) - begin();
741 }
742#endif // !wxUSE_UNICODE_UTF8/wxUSE_UNICODE_UTF8
743
744public:
745 // standard types
746 typedef wxUniChar value_type;
747 typedef wxUniChar char_type;
748 typedef wxUniCharRef reference;
749 typedef wxChar* pointer;
750 typedef const wxChar* const_pointer;
751
752 typedef size_t size_type;
753 typedef const wxUniChar const_reference;
754
755#if wxUSE_STD_STRING1
756 #if wxUSE_UNICODE_UTF80
757 // random access is not O(1), as required by Random Access Iterator
758 #define WX_STR_ITERATOR_TAG std::bidirectional_iterator_tag
759 #else
760 #define WX_STR_ITERATOR_TAG std::random_access_iterator_tag
761 #endif
762 #define WX_DEFINE_ITERATOR_CATEGORY(cat)typedef cat iterator_category; typedef cat iterator_category;
763#else
764 // not defining iterator_category at all in this case is better than defining
765 // it as some dummy type -- at least it results in more intelligible error
766 // messages
767 #define WX_DEFINE_ITERATOR_CATEGORY(cat)typedef cat iterator_category;
768#endif
769
770 #define WX_STR_ITERATOR_IMPL(iterator_name, pointer_type, reference_type) \
771 private: \
772 typedef wxStringImpl::iterator_name underlying_iterator; \
773 public: \
774 WX_DEFINE_ITERATOR_CATEGORY(WX_STR_ITERATOR_TAG)typedef WX_STR_ITERATOR_TAG iterator_category; \
775 typedef wxUniChar value_type; \
776 typedef ptrdiff_t difference_type; \
777 typedef reference_type reference; \
778 typedef pointer_type pointer; \
779 \
780 reference operator[](size_t n) const { return *(*this + n); } \
781 \
782 iterator_name& operator++() \
783 { wxStringOperations::IncIter(m_cur); return *this; } \
784 iterator_name& operator--() \
785 { wxStringOperations::DecIter(m_cur); return *this; } \
786 iterator_name operator++(int) \
787 { \
788 iterator_name tmp = *this; \
789 wxStringOperations::IncIter(m_cur); \
790 return tmp; \
791 } \
792 iterator_name operator--(int) \
793 { \
794 iterator_name tmp = *this; \
795 wxStringOperations::DecIter(m_cur); \
796 return tmp; \
797 } \
798 \
799 iterator_name& operator+=(ptrdiff_t n) \
800 { \
801 m_cur = wxStringOperations::AddToIter(m_cur, n); \
802 return *this; \
803 } \
804 iterator_name& operator-=(ptrdiff_t n) \
805 { \
806 m_cur = wxStringOperations::AddToIter(m_cur, -n); \
807 return *this; \
808 } \
809 \
810 difference_type operator-(const iterator_name& i) const \
811 { return wxStringOperations::DiffIters(m_cur, i.m_cur); } \
812 \
813 bool operator==(const iterator_name& i) const \
814 { return m_cur == i.m_cur; } \
815 bool operator!=(const iterator_name& i) const \
816 { return m_cur != i.m_cur; } \
817 \
818 bool operator<(const iterator_name& i) const \
819 { return m_cur < i.m_cur; } \
820 bool operator>(const iterator_name& i) const \
821 { return m_cur > i.m_cur; } \
822 bool operator<=(const iterator_name& i) const \
823 { return m_cur <= i.m_cur; } \
824 bool operator>=(const iterator_name& i) const \
825 { return m_cur >= i.m_cur; } \
826 \
827 private: \
828 /* for internal wxString use only: */ \
829 underlying_iterator impl() const { return m_cur; } \
830 \
831 friend class wxString; \
832 friend class wxCStrData; \
833 \
834 private: \
835 underlying_iterator m_cur
836
837 class WXDLLIMPEXP_FWD_BASE const_iterator;
838
839#if wxUSE_UNICODE_UTF80
840 // NB: In UTF-8 build, (non-const) iterator needs to keep reference
841 // to the underlying wxStringImpl, because UTF-8 is variable-length
842 // encoding and changing the value pointer to by an iterator (using
843 // its operator*) requires calling wxStringImpl::replace() if the old
844 // and new values differ in their encoding's length.
845 //
846 // Furthermore, the replace() call may invalid all iterators for the
847 // string, so we have to keep track of outstanding iterators and update
848 // them if replace() happens.
849 //
850 // This is implemented by maintaining linked list of iterators for every
851 // string and traversing it in wxUniCharRef::operator=(). Head of the
852 // list is stored in wxString. (FIXME-UTF8)
853
854 class WXDLLIMPEXP_BASE__attribute__ ((visibility("default"))) iterator
855 {
856 WX_STR_ITERATOR_IMPL(iterator, wxChar*, wxUniCharRef);
857
858 public:
859 iterator() {}
860 iterator(const iterator& i)
861 : m_cur(i.m_cur), m_node(i.str(), &m_cur) {}
862 iterator& operator=(const iterator& i)
863 {
864 if (&i != this)
865 {
866 m_cur = i.m_cur;
867 m_node.set(i.str(), &m_cur);
868 }
869 return *this;
870 }
871
872 reference operator*()
873 { return wxUniCharRef::CreateForString(*str(), m_cur); }
874
875 iterator operator+(ptrdiff_t n) const
876 { return iterator(str(), wxStringOperations::AddToIter(m_cur, n)); }
877 iterator operator-(ptrdiff_t n) const
878 { return iterator(str(), wxStringOperations::AddToIter(m_cur, -n)); }
879
880 // Normal iterators need to be comparable with the const_iterators so
881 // declare the comparison operators and implement them below after the
882 // full const_iterator declaration.
883 bool operator==(const const_iterator& i) const;
884 bool operator!=(const const_iterator& i) const;
885 bool operator<(const const_iterator& i) const;
886 bool operator>(const const_iterator& i) const;
887 bool operator<=(const const_iterator& i) const;
888 bool operator>=(const const_iterator& i) const;
889
890 private:
891 iterator(wxString *wxstr, underlying_iterator ptr)
892 : m_cur(ptr), m_node(wxstr, &m_cur) {}
893
894 wxString* str() const { return const_cast<wxString*>(m_node.m_str); }
895
896 wxStringIteratorNode m_node;
897
898 friend class const_iterator;
899 };
900
901 class WXDLLIMPEXP_BASE__attribute__ ((visibility("default"))) const_iterator
902 {
903 // NB: reference_type is intentionally value, not reference, the character
904 // may be encoded differently in wxString data:
905 WX_STR_ITERATOR_IMPL(const_iterator, const wxChar*, wxUniChar);
906
907 public:
908 const_iterator() {}
909 const_iterator(const const_iterator& i)
910 : m_cur(i.m_cur), m_node(i.str(), &m_cur) {}
911 const_iterator(const iterator& i)
912 : m_cur(i.m_cur), m_node(i.str(), &m_cur) {}
913
914 const_iterator& operator=(const const_iterator& i)
915 {
916 if (&i != this)
917 {
918 m_cur = i.m_cur;
919 m_node.set(i.str(), &m_cur);
920 }
921 return *this;
922 }
923 const_iterator& operator=(const iterator& i)
924 { m_cur = i.m_cur; m_node.set(i.str(), &m_cur); return *this; }
925
926 reference operator*() const
927 { return wxStringOperations::DecodeChar(m_cur); }
928
929 const_iterator operator+(ptrdiff_t n) const
930 { return const_iterator(str(), wxStringOperations::AddToIter(m_cur, n)); }
931 const_iterator operator-(ptrdiff_t n) const
932 { return const_iterator(str(), wxStringOperations::AddToIter(m_cur, -n)); }
933
934 // Until C++20 we could avoid defining these comparison operators because
935 // the implicit conversion from iterator to const_iterator was used to
936 // reuse the operators defined inside WX_STR_ITERATOR_IMPL. However in
937 // C++20 the operator overloads with reversed arguments would be used
938 // instead, resulting in infinite recursion, so we do need them and, just
939 // for consistency, define them in all cases.
940 bool operator==(const iterator& i) const;
941 bool operator!=(const iterator& i) const;
942 bool operator<(const iterator& i) const;
943 bool operator>(const iterator& i) const;
944 bool operator<=(const iterator& i) const;
945 bool operator>=(const iterator& i) const;
946
947 private:
948 // for internal wxString use only:
949 const_iterator(const wxString *wxstr, underlying_iterator ptr)
950 : m_cur(ptr), m_node(wxstr, &m_cur) {}
951
952 const wxString* str() const { return m_node.m_str; }
953
954 wxStringIteratorNode m_node;
955 };
956
957 iterator GetIterForNthChar(size_t n)
958 { return iterator(this, m_impl.begin() + PosToImpl(n)); }
959 const_iterator GetIterForNthChar(size_t n) const
960 { return const_iterator(this, m_impl.begin() + PosToImpl(n)); }
961#else // !wxUSE_UNICODE_UTF8
962
963 class WXDLLIMPEXP_BASE__attribute__ ((visibility("default"))) iterator
964 {
965 WX_STR_ITERATOR_IMPL(iterator, wxChar*, wxUniCharRef);
966
967 public:
968 iterator() {}
969 reference operator*()
970 { return wxUniCharRef::CreateForString(m_cur); }
971
972 iterator operator+(ptrdiff_t n) const
973 { return iterator(wxStringOperations::AddToIter(m_cur, n)); }
974 iterator operator-(ptrdiff_t n) const
975 { return iterator(wxStringOperations::AddToIter(m_cur, -n)); }
976
977 // As in UTF-8 case above, define comparison operators taking
978 // const_iterator too.
979 bool operator==(const const_iterator& i) const;
980 bool operator!=(const const_iterator& i) const;
981 bool operator<(const const_iterator& i) const;
982 bool operator>(const const_iterator& i) const;
983 bool operator<=(const const_iterator& i) const;
984 bool operator>=(const const_iterator& i) const;
985
986 private:
987 // for internal wxString use only:
988 iterator(underlying_iterator ptr) : m_cur(ptr) {}
989 iterator(wxString *WXUNUSED(str), underlying_iterator ptr) : m_cur(ptr) {}
990
991 friend class const_iterator;
992 };
993
994 class WXDLLIMPEXP_BASE__attribute__ ((visibility("default"))) const_iterator
995 {
996 // NB: reference_type is intentionally value, not reference, the character
997 // may be encoded differently in wxString data:
998 WX_STR_ITERATOR_IMPL(const_iterator, const wxChar*, wxUniChar);
999
1000 public:
1001 const_iterator() {}
1002 const_iterator(const iterator& i) : m_cur(i.m_cur) {}
1003
1004 const_reference operator*() const
1005 { return wxStringOperations::DecodeChar(m_cur); }
1006
1007 const_iterator operator+(ptrdiff_t n) const
1008 { return const_iterator(wxStringOperations::AddToIter(m_cur, n)); }
1009 const_iterator operator-(ptrdiff_t n) const
1010 { return const_iterator(wxStringOperations::AddToIter(m_cur, -n)); }
1011
1012 // See comment for comparison operators in the UTF-8 case above.
1013 bool operator==(const iterator& i) const;
1014 bool operator!=(const iterator& i) const;
1015 bool operator<(const iterator& i) const;
1016 bool operator>(const iterator& i) const;
1017 bool operator<=(const iterator& i) const;
1018 bool operator>=(const iterator& i) const;
1019
1020 private:
1021 // for internal wxString use only:
1022 const_iterator(underlying_iterator ptr) : m_cur(ptr) {}
1023 const_iterator(const wxString *WXUNUSED(str), underlying_iterator ptr)
1024 : m_cur(ptr) {}
1025 };
1026
1027 iterator GetIterForNthChar(size_t n) { return begin() + n; }
1028 const_iterator GetIterForNthChar(size_t n) const { return begin() + n; }
1029#endif // wxUSE_UNICODE_UTF8/!wxUSE_UNICODE_UTF8
1030
1031 size_t IterToImplPos(wxString::iterator i) const
1032 { return wxStringImpl::const_iterator(i.impl()) - m_impl.begin(); }
1033
1034 #undef WX_STR_ITERATOR_TAG
1035 #undef WX_STR_ITERATOR_IMPL
1036
1037 // This method is mostly used by wxWidgets itself and return the offset of
1038 // the given iterator in bytes relative to the start of the buffer
1039 // representing the current string contents in the current locale encoding.
1040 //
1041 // It is inefficient as it involves converting part of the string to this
1042 // encoding (and also unsafe as it simply returns 0 if the conversion fails)
1043 // and so should be avoided if possible, wx itself only uses it to implement
1044 // backwards-compatible API.
1045 ptrdiff_t IterOffsetInMBStr(const const_iterator& i) const
1046 {
1047 const wxString str(begin(), i);
1048
1049 // This is logically equivalent to strlen(str.mb_str()) but avoids
1050 // actually converting the string to multibyte and just computes the
1051 // length that it would have after conversion.
1052
1053 // Note that in UTF-8 build we need to use the actual wide character
1054 // buffer length and not the string length, as it may be different when
1055 // using surrogates, but in wchar_t build they're the same by definition
1056 // and we can avoid creating an extra buffer.
1057#if wxUSE_UNICODE_UTF80
1058 const wxScopedWCharBuffer wbuf(str.wc_str());
1059 const size_t ofs = wxConvLibcwxGet_wxConvLibc().FromWChar(NULL__null, 0, wbuf.data(), wbuf.length());
1060#else // wxUSE_UNICODE_WCHAR
1061 const size_t ofs = wxConvLibcwxGet_wxConvLibc().FromWChar(NULL__null, 0, str.wc_str(), str.length());
1062#endif
1063 return ofs == wxCONV_FAILED((size_t)-1) ? 0 : static_cast<ptrdiff_t>(ofs);
1064 }
1065
1066 friend class iterator;
1067 friend class const_iterator;
1068
1069 template <typename T>
1070 class reverse_iterator_impl
1071 {
1072 public:
1073 typedef T iterator_type;
1074
1075 WX_DEFINE_ITERATOR_CATEGORY(typename T::iterator_category)typedef typename T::iterator_category iterator_category;
1076 typedef typename T::value_type value_type;
1077 typedef typename T::difference_type difference_type;
1078 typedef typename T::reference reference;
1079 typedef typename T::pointer *pointer;
1080
1081 reverse_iterator_impl() {}
1082 reverse_iterator_impl(iterator_type i) : m_cur(i) {}
1083
1084 iterator_type base() const { return m_cur; }
1085
1086 reference operator*() const { return *(m_cur-1); }
1087 reference operator[](size_t n) const { return *(*this + n); }
1088
1089 reverse_iterator_impl& operator++()
1090 { --m_cur; return *this; }
1091 reverse_iterator_impl operator++(int)
1092 { reverse_iterator_impl tmp = *this; --m_cur; return tmp; }
1093 reverse_iterator_impl& operator--()
1094 { ++m_cur; return *this; }
1095 reverse_iterator_impl operator--(int)
1096 { reverse_iterator_impl tmp = *this; ++m_cur; return tmp; }
1097
1098 reverse_iterator_impl operator+(ptrdiff_t n) const
1099 { return reverse_iterator_impl(m_cur - n); }
1100 reverse_iterator_impl operator-(ptrdiff_t n) const
1101 { return reverse_iterator_impl(m_cur + n); }
1102 reverse_iterator_impl operator+=(ptrdiff_t n)
1103 { m_cur -= n; return *this; }
1104 reverse_iterator_impl operator-=(ptrdiff_t n)
1105 { m_cur += n; return *this; }
1106
1107 difference_type operator-(const reverse_iterator_impl& i) const
1108 { return i.m_cur - m_cur; }
1109
1110 bool operator==(const reverse_iterator_impl& ri) const
1111 { return m_cur == ri.m_cur; }
1112 bool operator!=(const reverse_iterator_impl& ri) const
1113 { return !(*this == ri); }
1114
1115 bool operator<(const reverse_iterator_impl& i) const
1116 { return m_cur > i.m_cur; }
1117 bool operator>(const reverse_iterator_impl& i) const
1118 { return m_cur < i.m_cur; }
1119 bool operator<=(const reverse_iterator_impl& i) const
1120 { return m_cur >= i.m_cur; }
1121 bool operator>=(const reverse_iterator_impl& i) const
1122 { return m_cur <= i.m_cur; }
1123
1124 private:
1125 iterator_type m_cur;
1126 };
1127
1128 typedef reverse_iterator_impl<iterator> reverse_iterator;
1129 typedef reverse_iterator_impl<const_iterator> const_reverse_iterator;
1130
1131private:
1132 // used to transform an expression built using c_str() (and hence of type
1133 // wxCStrData) to an iterator into the string
1134 static const_iterator CreateConstIterator(const wxCStrData& data)
1135 {
1136 return const_iterator(data.m_str,
1137 (data.m_str->begin() + data.m_offset).impl());
1138 }
1139
1140 // in UTF-8 STL build, creation from std::string requires conversion under
1141 // non-UTF8 locales, so we can't have and use wxString(wxStringImpl) ctor;
1142 // instead we define dummy type that lets us have wxString ctor for creation
1143 // from wxStringImpl that couldn't be used by user code (in all other builds,
1144 // "standard" ctors can be used):
1145#if wxUSE_UNICODE_UTF80 && wxUSE_STL_BASED_WXSTRING1
1146 struct CtorFromStringImplTag {};
1147
1148 wxString(CtorFromStringImplTag* WXUNUSED(dummy), const wxStringImpl& src)
1149 : m_impl(src) {}
1150
1151 static wxString FromImpl(const wxStringImpl& src)
1152 { return wxString((CtorFromStringImplTag*)NULL__null, src); }
1153
1154 #ifdef wxHAS_RVALUE_REF
1155 wxString(CtorFromStringImplTag* WXUNUSED(dummy), wxStringImpl&& src) wxNOEXCEPTnoexcept
1156 : m_impl(std::move(src)) {}
1157
1158 static wxString FromImpl(wxStringImpl&& src) wxNOEXCEPTnoexcept
1159 {
1160 return wxString((CtorFromStringImplTag*)NULL__null, std::move(src));
1161 }
1162 #endif
1163#else
1164 #if !wxUSE_STL_BASED_WXSTRING1
1165 wxString(const wxStringImpl& src) : m_impl(src) { }
1166 // else: already defined as wxString(wxStdString) below
1167 #endif
1168 static wxString FromImpl(const wxStringImpl& src) { return wxString(src); }
1169 #ifdef wxHAS_RVALUE_REF
1170 static wxString FromImpl(wxStringImpl&& src) wxNOEXCEPTnoexcept { return wxString(std::move(src)); }
1171 #endif
1172#endif
1173
1174public:
1175 // constructors and destructor
1176 // ctor for an empty string
1177 wxString() {}
1178
1179 // copy ctor
1180 wxString(const wxString& stringSrc) : m_impl(stringSrc.m_impl) { }
1181
1182#ifdef wxHAS_RVALUE_REF
1183 // move ctor
1184 wxString(wxString&& stringSrc) wxNOEXCEPTnoexcept : m_impl(std::move(stringSrc.m_impl))
1185 {
1186#if wxUSE_STRING_POS_CACHE0
1187 stringSrc.InvalidateCache();
1188#endif // wxUSE_STRING_POS_CACHE
1189 }
1190#endif
1191
1192 // string containing nRepeat copies of ch
1193 wxString(wxUniChar ch, size_t nRepeat = 1 )
1194 { assign(nRepeat, ch); }
1195 wxString(size_t nRepeat, wxUniChar ch)
1196 { assign(nRepeat, ch); }
1197 wxString(wxUniCharRef ch, size_t nRepeat = 1)
1198 { assign(nRepeat, ch); }
1199 wxString(size_t nRepeat, wxUniCharRef ch)
1200 { assign(nRepeat, ch); }
1201 wxString(char ch, size_t nRepeat = 1)
1202 { assign(nRepeat, ch); }
1203 wxString(size_t nRepeat, char ch)
1204 { assign(nRepeat, ch); }
1205 wxString(wchar_t ch, size_t nRepeat = 1)
1206 { assign(nRepeat, ch); }
1207 wxString(size_t nRepeat, wchar_t ch)
1208 { assign(nRepeat, ch); }
1209
1210#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
1211 // ctors from char* strings:
1212 wxString(const char *psz)
1213 : m_impl(ImplStr(psz)) {}
1214#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
1215 wxString(const char *psz, const wxMBConv& conv)
1216 : m_impl(ImplStr(psz, conv)) {}
1217#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
1218 wxString(const char *psz, size_t nLength)
1219 { assign(psz, nLength); }
1220#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
1221 wxString(const char *psz, const wxMBConv& conv, size_t nLength)
1222 {
1223 SubstrBufFromMB str(ImplStr(psz, nLength, conv));
1224 m_impl.assign(str.data, str.len);
1225 }
1226
1227 // and unsigned char*:
1228#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
1229 wxString(const unsigned char *psz)
1230 : m_impl(ImplStr((const char*)psz)) {}
1231#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
1232 wxString(const unsigned char *psz, const wxMBConv& conv)
1233 : m_impl(ImplStr((const char*)psz, conv)) {}
1234#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
1235 wxString(const unsigned char *psz, size_t nLength)
1236 { assign((const char*)psz, nLength); }
1237#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
1238 wxString(const unsigned char *psz, const wxMBConv& conv, size_t nLength)
1239 {
1240 SubstrBufFromMB str(ImplStr((const char*)psz, nLength, conv));
1241 m_impl.assign(str.data, str.len);
1242 }
1243
1244 // ctors from wchar_t* strings:
1245 wxString(const wchar_t *pwz)
1246 : m_impl(ImplStr(pwz)) {}
1247 wxString(const wchar_t *pwz, const wxMBConv& WXUNUSED(conv))
1248 : m_impl(ImplStr(pwz)) {}
1249 wxString(const wchar_t *pwz, size_t nLength)
1250 { assign(pwz, nLength); }
1251 wxString(const wchar_t *pwz, const wxMBConv& WXUNUSED(conv), size_t nLength)
1252 { assign(pwz, nLength); }
1253
1254#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
1255 wxString(const wxScopedCharBuffer& buf)
1256 { assign(buf.data(), buf.length()); }
1257#endif
1258 wxString(const wxScopedWCharBuffer& buf)
1259 { assign(buf.data(), buf.length()); }
1260
1261 wxString(const wxScopedCharBuffer& buf, const wxMBConv& conv)
1262 { assign(buf, conv); }
1263
1264 // NB: this version uses m_impl.c_str() to force making a copy of the
1265 // string, so that "wxString(str.c_str())" idiom for passing strings
1266 // between threads works
1267 wxString(const wxCStrData& cstr)
1268 : m_impl(cstr.AsString().m_impl.c_str()) { }
1269
1270 // as we provide both ctors with this signature for both char and unsigned
1271 // char string, we need to provide one for wxCStrData to resolve ambiguity
1272 wxString(const wxCStrData& cstr, size_t nLength)
1273 : m_impl(cstr.AsString().Mid(0, nLength).m_impl) {}
1274
1275 // and because wxString is convertible to wxCStrData and const wxChar *
1276 // we also need to provide this one
1277 wxString(const wxString& str, size_t nLength)
1278 { assign(str, nLength); }
1279#ifdef wxHAS_RVALUE_REF
1280 wxString(wxString&& str, size_t nLength)
1281 { assign(std::move(str), nLength); }
1282#endif
1283
1284
1285#if wxUSE_STRING_POS_CACHE0
1286 ~wxString()
1287 {
1288 // we need to invalidate our cache entry as another string could be
1289 // recreated at the same address (unlikely, but still possible, with the
1290 // heap-allocated strings but perfectly common with stack-allocated ones)
1291 InvalidateCache();
1292 }
1293#endif // wxUSE_STRING_POS_CACHE
1294
1295 // even if we're not built with wxUSE_STD_STRING_CONV_IN_WXSTRING == 1 it is
1296 // very convenient to allow implicit conversions from std::string to wxString
1297 // and vice verse as this allows to use the same strings in non-GUI and GUI
1298 // code, however we don't want to unconditionally add this ctor as it would
1299 // make wx lib dependent on libstdc++ on some Linux versions which is bad, so
1300 // instead we ask the client code to define this wxUSE_STD_STRING symbol if
1301 // they need it
1302#if wxUSE_STD_STRING1
1303 #if wxUSE_UNICODE_WCHAR1
1304 wxString(const wxStdWideString& str) : m_impl(str) {}
1305 #ifdef wxHAS_RVALUE_REF
1306 wxString(wxStdWideString&& str) wxNOEXCEPTnoexcept : m_impl(std::move(str)) {}
1307 #endif
1308 #else // UTF-8 or ANSI
1309 wxString(const wxStdWideString& str)
1310 { assign(str.c_str(), str.length()); }
1311 #endif
1312
1313#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
1314 #if !wxUSE_UNICODE1 // ANSI build
1315 // FIXME-UTF8: do this in UTF8 build #if wxUSE_UTF8_LOCALE_ONLY, too
1316 wxString(const std::string& str) : m_impl(str) {}
1317 #ifdef wxHAS_RVALUE_REF
1318 wxString(std::string&& str) wxNOEXCEPTnoexcept : m_impl(std::move(str)) {}
1319 #endif
1320 #else // Unicode
1321 wxString(const std::string& str)
1322 { assign(str.c_str(), str.length()); }
1323 #endif
1324#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
1325#endif // wxUSE_STD_STRING
1326
1327 // Also always provide explicit conversions to std::[w]string in any case,
1328 // see below for the implicit ones.
1329#if wxUSE_STD_STRING1
1330 // We can avoid a copy if we already use this string type internally,
1331 // otherwise we create a copy on the fly:
1332 #if wxUSE_UNICODE_WCHAR1 && wxUSE_STL_BASED_WXSTRING1
1333 #define wxStringToStdWstringRetType const wxStdWideString&
1334 const wxStdWideString& ToStdWstring() const { return m_impl; }
1335 #else
1336 // wxStringImpl is either not std::string or needs conversion
1337 #define wxStringToStdWstringRetType wxStdWideString
1338 wxStdWideString ToStdWstring() const
1339 {
1340#if wxUSE_UNICODE_WCHAR1
1341 wxScopedWCharBuffer buf =
1342 wxScopedWCharBuffer::CreateNonOwned(m_impl.c_str(), m_impl.length());
1343#else // !wxUSE_UNICODE_WCHAR
1344 wxScopedWCharBuffer buf(wc_str());
1345#endif
1346
1347 return wxStdWideString(buf.data(), buf.length());
1348 }
1349 #endif
1350
1351 #if (!wxUSE_UNICODE1 || wxUSE_UTF8_LOCALE_ONLY0) && wxUSE_STL_BASED_WXSTRING1
1352 // wxStringImpl is std::string in the encoding we want
1353 #define wxStringToStdStringRetType const std::string&
1354 const std::string& ToStdString() const { return m_impl; }
1355 std::string ToStdString(const wxMBConv& WXUNUSED(conv)) const
1356 {
1357 // No conversions are done when not using Unicode as everything is
1358 // supposed to be in 7 bit ASCII anyhow, this method is provided just
1359 // for compatibility with the Unicode build.
1360 return ToStdString();
1361 }
1362 #else
1363 // wxStringImpl is either not std::string or needs conversion
1364 #define wxStringToStdStringRetType std::string
1365 std::string ToStdString(const wxMBConv& conv wxSTRING_DEFAULT_CONV_ARG= wxGet_wxConvLibc()) const
1366 {
1367 wxScopedCharBuffer buf(mb_str(conv));
1368 return std::string(buf.data(), buf.length());
1369 }
1370 #endif
1371
1372#if wxUSE_STD_STRING_CONV_IN_WXSTRING0
1373 // Implicit conversions to std::[w]string are not provided by default as
1374 // they conflict with the implicit conversions to "const char/wchar_t *"
1375 // which we use for backwards compatibility but do provide them if
1376 // explicitly requested.
1377#if wxUSE_UNSAFE_WXSTRING_CONV1 && !defined(wxNO_UNSAFE_WXSTRING_CONV)
1378 operator wxStringToStdStringRetType() const { return ToStdString(); }
1379#endif // wxUSE_UNSAFE_WXSTRING_CONV
1380 operator wxStringToStdWstringRetType() const { return ToStdWstring(); }
1381#endif // wxUSE_STD_STRING_CONV_IN_WXSTRING
1382
1383#undef wxStringToStdStringRetType
1384#undef wxStringToStdWstringRetType
1385
1386#endif // wxUSE_STD_STRING
1387
1388 wxString Clone() const
1389 {
1390 // make a deep copy of the string, i.e. the returned string will have
1391 // ref count = 1 with refcounted implementation
1392 return wxString::FromImpl(wxStringImpl(m_impl.c_str(), m_impl.length()));
1393 }
1394
1395 // first valid index position
1396 const_iterator begin() const { return const_iterator(this, m_impl.begin()); }
1397 iterator begin() { return iterator(this, m_impl.begin()); }
1398 const_iterator cbegin() const { return const_iterator(this, m_impl.begin()); }
1399 // position one after the last valid one
1400 const_iterator end() const { return const_iterator(this, m_impl.end()); }
1401 iterator end() { return iterator(this, m_impl.end()); }
1402 const_iterator cend() const { return const_iterator(this, m_impl.end()); }
1403
1404 // first element of the reversed string
1405 const_reverse_iterator rbegin() const
1406 { return const_reverse_iterator(end()); }
1407 reverse_iterator rbegin()
1408 { return reverse_iterator(end()); }
1409 const_reverse_iterator crbegin() const
1410 { return const_reverse_iterator(end()); }
1411 // one beyond the end of the reversed string
1412 const_reverse_iterator rend() const
1413 { return const_reverse_iterator(begin()); }
1414 reverse_iterator rend()
1415 { return reverse_iterator(begin()); }
1416 const_reverse_iterator crend() const
1417 { return const_reverse_iterator(begin()); }
1418
1419 // std::string methods:
1420#if wxUSE_UNICODE_UTF80
1421 size_t length() const
1422 {
1423#if wxUSE_STRING_POS_CACHE0
1424 wxCACHE_PROFILE_FIELD_INC(lentot);
1425
1426 Cache::Element * const cache = GetCacheElement();
1427
1428 if ( cache->len == npos )
1429 {
1430 // it's probably not worth trying to be clever and using cache->pos
1431 // here as it's probably 0 anyhow -- you usually call length() before
1432 // starting to index the string
1433 cache->len = end() - begin();
1434 }
1435 else
1436 {
1437 wxCACHE_PROFILE_FIELD_INC(lenhits);
1438
1439 wxSTRING_CACHE_ASSERT( (int)cache->len == end() - begin() );
1440 }
1441
1442 return cache->len;
1443#else // !wxUSE_STRING_POS_CACHE
1444 return end() - begin();
1445#endif // wxUSE_STRING_POS_CACHE/!wxUSE_STRING_POS_CACHE
1446 }
1447#else
1448 size_t length() const { return m_impl.length(); }
1449#endif
1450
1451 size_type size() const { return length(); }
1452 size_type max_size() const { return npos; }
1453
1454 bool empty() const { return m_impl.empty(); }
1455
1456 // NB: these methods don't have a well-defined meaning in UTF-8 case
1457 size_type capacity() const { return m_impl.capacity(); }
1458 void reserve(size_t sz) { m_impl.reserve(sz); }
1459
1460 void shrink_to_fit() { Shrink(); }
1461
1462 void resize(size_t nSize, wxUniChar ch = wxT('\0')L'\0')
1463 {
1464 const size_t len = length();
1465 if ( nSize == len)
1466 return;
1467
1468#if wxUSE_UNICODE_UTF80
1469 if ( nSize < len )
1470 {
1471 wxSTRING_INVALIDATE_CACHE();
1472
1473 // we can't use wxStringImpl::resize() for truncating the string as it
1474 // counts in bytes, not characters
1475 erase(nSize);
1476 return;
1477 }
1478
1479 // we also can't use (presumably more efficient) resize() if we have to
1480 // append characters taking more than one byte
1481 if ( !ch.IsAscii() )
1482 {
1483 append(nSize - len, ch);
1484 }
1485 else // can use (presumably faster) resize() version
1486#endif // wxUSE_UNICODE_UTF8
1487 {
1488 wxSTRING_INVALIDATE_CACHED_LENGTH();
1489
1490 m_impl.resize(nSize, (wxStringCharType)ch);
1491 }
1492 }
1493
1494 wxString substr(size_t nStart = 0, size_t nLen = npos) const
1495 {
1496 size_t pos, len;
1497 PosLenToImpl(nStart, nLen, &pos, &len);
1498 return FromImpl(m_impl.substr(pos, len));
1499 }
1500
1501 // generic attributes & operations
1502 // as standard strlen()
1503 size_t Len() const { return length(); }
1504 // string contains any characters?
1505 bool IsEmpty() const { return empty(); }
1506 // empty string is "false", so !str will return true
1507 bool operator!() const { return empty(); }
1508 // truncate the string to given length
1509 wxString& Truncate(size_t uiLen);
1510 // empty string contents
1511 void Empty() { clear(); }
1512 // empty the string and free memory
1513 void Clear() { clear(); }
1514
1515 // contents test
1516 // Is an ascii value
1517 bool IsAscii() const;
1518 // Is a number
1519 bool IsNumber() const;
1520 // Is a word
1521 bool IsWord() const;
1522
1523 // data access (all indexes are 0 based)
1524 // read access
1525 wxUniChar at(size_t n) const
1526 { return wxStringOperations::DecodeChar(m_impl.begin() + PosToImpl(n)); }
1527 wxUniChar GetChar(size_t n) const
1528 { return at(n); }
1529 // read/write access
1530 wxUniCharRef at(size_t n)
1531 { return *GetIterForNthChar(n); }
1532 wxUniCharRef GetWritableChar(size_t n)
1533 { return at(n); }
1534 // write access
1535 void SetChar(size_t n, wxUniChar ch)
1536 { at(n) = ch; }
1537
1538 // get last character
1539 wxUniChar Last() const
1540 {
1541 wxASSERT_MSG( !empty(), wxT("wxString: index out of bounds") )do { if ( !empty() ) { } else if ( wxTheAssertHandler &&
(wxOnAssert("/usr/include/wx-3.2/wx/string.h", 1541, __FUNCTION__
, "!empty()", L"wxString: index out of bounds"), wxTrapInAssert
) ) { wxTrapInAssert = false; asm volatile ("int $3"); } } while
( (void)0, 0 )
;
1542 return *rbegin();
1543 }
1544
1545 // get writable last character
1546 wxUniCharRef Last()
1547 {
1548 wxASSERT_MSG( !empty(), wxT("wxString: index out of bounds") )do { if ( !empty() ) { } else if ( wxTheAssertHandler &&
(wxOnAssert("/usr/include/wx-3.2/wx/string.h", 1548, __FUNCTION__
, "!empty()", L"wxString: index out of bounds"), wxTrapInAssert
) ) { wxTrapInAssert = false; asm volatile ("int $3"); } } while
( (void)0, 0 )
;
1549 return *rbegin();
1550 }
1551
1552 /*
1553 Note that we must define all of the overloads below to avoid
1554 ambiguity when using str[0].
1555 */
1556 wxUniChar operator[](int n) const
1557 { return at(n); }
1558 wxUniChar operator[](long n) const
1559 { return at(n); }
1560 wxUniChar operator[](size_t n) const
1561 { return at(n); }
1562#ifndef wxSIZE_T_IS_UINT
1563 wxUniChar operator[](unsigned int n) const
1564 { return at(n); }
1565#endif // size_t != unsigned int
1566
1567 // operator versions of GetWriteableChar()
1568 wxUniCharRef operator[](int n)
1569 { return at(n); }
1570 wxUniCharRef operator[](long n)
1571 { return at(n); }
1572 wxUniCharRef operator[](size_t n)
1573 { return at(n); }
1574#ifndef wxSIZE_T_IS_UINT
1575 wxUniCharRef operator[](unsigned int n)
1576 { return at(n); }
1577#endif // size_t != unsigned int
1578
1579
1580 /*
1581 Overview of wxString conversions, implicit and explicit:
1582
1583 - wxString has a std::[w]string-like c_str() method, however it does
1584 not return a C-style string directly but instead returns wxCStrData
1585 helper object which is convertible to either "char *" narrow string
1586 or "wchar_t *" wide string. Usually the correct conversion will be
1587 applied by the compiler automatically but if this doesn't happen you
1588 need to explicitly choose one using wxCStrData::AsChar() or AsWChar()
1589 methods or another wxString conversion function.
1590
1591 - One of the places where the conversion does *NOT* happen correctly is
1592 when c_str() is passed to a vararg function such as printf() so you
1593 must *NOT* use c_str() with them. Either use wxPrintf() (all wx
1594 functions do handle c_str() correctly, even if they appear to be
1595 vararg (but they're not, really)) or add an explicit AsChar() or, if
1596 compatibility with previous wxWidgets versions is important, add a
1597 cast to "const char *".
1598
1599 - In non-STL mode only, wxString is also implicitly convertible to
1600 wxCStrData. The same warning as above applies.
1601
1602 - c_str() is polymorphic as it can be converted to either narrow or
1603 wide string. If you explicitly need one or the other, choose to use
1604 mb_str() (for narrow) or wc_str() (for wide) instead. Notice that
1605 these functions can return either the pointer to string directly (if
1606 this is what the string uses internally) or a temporary buffer
1607 containing the string and convertible to it. Again, conversion will
1608 usually be done automatically by the compiler but beware of the
1609 vararg functions: you need an explicit cast when using them.
1610
1611 - There are also non-const versions of mb_str() and wc_str() called
1612 char_str() and wchar_str(). They are only meant to be used with
1613 non-const-correct functions and they always return buffers.
1614
1615 - Finally wx_str() returns whatever string representation is used by
1616 wxString internally. It may be either a narrow or wide string
1617 depending on wxWidgets build mode but it will always be a raw pointer
1618 (and not a buffer).
1619 */
1620
1621 // explicit conversion to wxCStrData
1622 wxCStrData c_str() const { return wxCStrData(this); }
1623 wxCStrData data() const { return c_str(); }
1624
1625 // implicit conversion to wxCStrData
1626 operator wxCStrData() const { return c_str(); }
1627
1628 // the first two operators conflict with operators for conversion to
1629 // std::string and they must be disabled if those conversions are enabled;
1630 // the next one only makes sense if conversions to char* are also defined
1631 // and not defining it in STL build also helps us to get more clear error
1632 // messages for the code which relies on implicit conversion to char* in
1633 // STL build
1634#if !wxUSE_STD_STRING_CONV_IN_WXSTRING0
1635 operator const wchar_t*() const { return c_str(); }
1636
1637#if wxUSE_UNSAFE_WXSTRING_CONV1 && !defined(wxNO_UNSAFE_WXSTRING_CONV)
1638 operator const char*() const { return c_str(); }
1639 // implicit conversion to untyped pointer for compatibility with previous
1640 // wxWidgets versions: this is the same as conversion to const char * so it
1641 // may fail!
1642 operator const void*() const { return c_str(); }
1643#endif // wxUSE_UNSAFE_WXSTRING_CONV && !defined(wxNO_UNSAFE_WXSTRING_CONV)
1644
1645#endif // !wxUSE_STD_STRING_CONV_IN_WXSTRING
1646
1647 // identical to c_str(), for MFC compatibility
1648 const wxCStrData GetData() const { return c_str(); }
1649
1650 // explicit conversion to C string in internal representation (char*,
1651 // wchar_t*, UTF-8-encoded char*, depending on the build):
1652 const wxStringCharType *wx_str() const { return m_impl.c_str(); }
1653
1654 // conversion to *non-const* multibyte or widestring buffer; modifying
1655 // returned buffer won't affect the string, these methods are only useful
1656 // for passing values to const-incorrect functions
1657 wxWritableCharBuffer char_str(const wxMBConv& conv wxSTRING_DEFAULT_CONV_ARG= wxGet_wxConvLibc()) const
1658 { return mb_str(conv); }
1659 wxWritableWCharBuffer wchar_str() const { return wc_str(); }
1660
1661 // conversion to the buffer of the given type T (= char or wchar_t) and
1662 // also optionally return the buffer length
1663 //
1664 // this is mostly/only useful for the template functions
1665 template <typename T>
1666 wxCharTypeBuffer<T> tchar_str(size_t *len = NULL__null) const
1667 {
1668#if wxUSE_UNICODE1
1669 // we need a helper dispatcher depending on type
1670 return wxPrivate::wxStringAsBufHelper<T>::Get(*this, len);
1671#else // ANSI
1672 // T can only be char in ANSI build
1673 if ( len )
1674 *len = length();
1675
1676 return wxCharTypeBuffer<T>::CreateNonOwned(wx_str(), length());
1677#endif // Unicode build kind
1678 }
1679
1680 // conversion to/from plain (i.e. 7 bit) ASCII: this is useful for
1681 // converting numbers or strings which are certain not to contain special
1682 // chars (typically system functions, X atoms, environment variables etc.)
1683 //
1684 // the behaviour of these functions with the strings containing anything
1685 // else than 7 bit ASCII characters is undefined, use at your own risk.
1686#if wxUSE_UNICODE1
1687 static wxString FromAscii(const char *ascii, size_t len);
1688 static wxString FromAscii(const char *ascii);
1689 static wxString FromAscii(char ascii);
1690 const wxScopedCharBuffer ToAscii(char replaceWith = '_') const;
1691#else // ANSI
1692 static wxString FromAscii(const char *ascii) { return wxString( ascii ); }
1693 static wxString FromAscii(const char *ascii, size_t len)
1694 { return wxString( ascii, len ); }
1695 static wxString FromAscii(char ascii) { return wxString( ascii ); }
1696 const char *ToAscii(char WXUNUSED(replaceWith) = '_') const { return c_str(); }
1697#endif // Unicode/!Unicode
1698
1699 // also provide unsigned char overloads as signed/unsigned doesn't matter
1700 // for 7 bit ASCII characters
1701 static wxString FromAscii(const unsigned char *ascii)
1702 { return FromAscii((const char *)ascii); }
1703 static wxString FromAscii(const unsigned char *ascii, size_t len)
1704 { return FromAscii((const char *)ascii, len); }
1705
1706 // conversion to/from UTF-8:
1707#if wxUSE_UNICODE_UTF80
1708 static wxString FromUTF8Unchecked(const char *utf8)
1709 {
1710 if ( !utf8 )
1711 return wxEmptyString;
1712
1713 wxASSERT( wxStringOperations::IsValidUtf8String(utf8) )do { if ( wxStringOperations::IsValidUtf8String(utf8) ) { } else
if ( wxTheAssertHandler && (wxOnAssert("/usr/include/wx-3.2/wx/string.h"
, 1713, __FUNCTION__, "wxStringOperations::IsValidUtf8String(utf8)"
, (const char*)__null), wxTrapInAssert) ) { wxTrapInAssert = false
; asm volatile ("int $3"); } } while ( (void)0, 0 )
;
1714 return FromImpl(wxStringImpl(utf8));
1715 }
1716 static wxString FromUTF8Unchecked(const char *utf8, size_t len)
1717 {
1718 if ( !utf8 )
1719 return wxEmptyString;
1720 if ( len == npos )
1721 return FromUTF8Unchecked(utf8);
1722
1723 wxASSERT( wxStringOperations::IsValidUtf8String(utf8, len) )do { if ( wxStringOperations::IsValidUtf8String(utf8, len) ) {
} else if ( wxTheAssertHandler && (wxOnAssert("/usr/include/wx-3.2/wx/string.h"
, 1723, __FUNCTION__, "wxStringOperations::IsValidUtf8String(utf8, len)"
, (const char*)__null), wxTrapInAssert) ) { wxTrapInAssert = false
; asm volatile ("int $3"); } } while ( (void)0, 0 )
;
1724 return FromImpl(wxStringImpl(utf8, len));
1725 }
1726
1727 static wxString FromUTF8(const char *utf8)
1728 {
1729 if ( !utf8 || !wxStringOperations::IsValidUtf8String(utf8) )
1730 return wxString();
1731
1732 return FromImpl(wxStringImpl(utf8));
1733 }
1734 static wxString FromUTF8(const char *utf8, size_t len)
1735 {
1736 if ( len == npos )
1737 return FromUTF8(utf8);
1738
1739 if ( !utf8 || !wxStringOperations::IsValidUtf8String(utf8, len) )
1740 return wxString();
1741
1742 return FromImpl(wxStringImpl(utf8, len));
1743 }
1744
1745#if wxUSE_STD_STRING1
1746 static wxString FromUTF8Unchecked(const std::string& utf8)
1747 {
1748 wxASSERT( wxStringOperations::IsValidUtf8String(utf8.c_str(), utf8.length()) )do { if ( wxStringOperations::IsValidUtf8String(utf8.c_str(),
utf8.length()) ) { } else if ( wxTheAssertHandler &&
(wxOnAssert("/usr/include/wx-3.2/wx/string.h", 1748, __FUNCTION__
, "wxStringOperations::IsValidUtf8String(utf8.c_str(), utf8.length())"
, (const char*)__null), wxTrapInAssert) ) { wxTrapInAssert = false
; asm volatile ("int $3"); } } while ( (void)0, 0 )
;
1749 /*
1750 Note that, under wxUSE_UNICODE_UTF8 and wxUSE_STD_STRING, wxStringImpl can be
1751 initialized with a std::string whether wxUSE_STL_BASED_WXSTRING is 1 or not.
1752 */
1753 return FromImpl(utf8);
1754 }
1755 static wxString FromUTF8(const std::string& utf8)
1756 {
1757 if ( utf8.empty() || !wxStringOperations::IsValidUtf8String(utf8.c_str(), utf8.length()) )
1758 return wxString();
1759 return FromImpl(utf8);
1760 }
1761
1762 #ifdef wxHAS_RVALUE_REF
1763 static wxString FromUTF8Unchecked(std::string&& utf8) wxNOEXCEPTnoexcept
1764 {
1765 wxASSERT(wxStringOperations::IsValidUtf8String(utf8.c_str(), utf8.length()))do { if ( wxStringOperations::IsValidUtf8String(utf8.c_str(),
utf8.length()) ) { } else if ( wxTheAssertHandler &&
(wxOnAssert("/usr/include/wx-3.2/wx/string.h", 1765, __FUNCTION__
, "wxStringOperations::IsValidUtf8String(utf8.c_str(), utf8.length())"
, (const char*)__null), wxTrapInAssert) ) { wxTrapInAssert = false
; asm volatile ("int $3"); } } while ( (void)0, 0 )
;
1766 return FromImpl(std::move(utf8));
1767 }
1768 static wxString FromUTF8(std::string&& utf8)
1769 {
1770 if (utf8.empty() || !wxStringOperations::IsValidUtf8String(utf8.c_str(), utf8.length()))
1771 return wxString();
1772 return FromImpl(std::move(utf8));
1773 }
1774 #endif
1775
1776 std::string utf8_string() const { return m_impl; }
1777#endif
1778
1779 const wxScopedCharBuffer utf8_str() const
1780 { return wxCharBuffer::CreateNonOwned(m_impl.c_str(), m_impl.length()); }
1781
1782 // this function exists in UTF-8 build only and returns the length of the
1783 // internal UTF-8 representation
1784 size_t utf8_length() const { return m_impl.length(); }
1785#elif wxUSE_UNICODE_WCHAR1
1786 static wxString FromUTF8(const char *utf8, size_t len = npos)
1787 { return wxString(utf8, wxMBConvUTF8(), len); }
1788 static wxString FromUTF8Unchecked(const char *utf8, size_t len = npos)
1789 {
1790 const wxString s(utf8, wxMBConvUTF8(), len);
1791 wxASSERT_MSG( !utf8 || !*utf8 || !s.empty(),do { if ( !utf8 || !*utf8 || !s.empty() ) { } else if ( wxTheAssertHandler
&& (wxOnAssert("/usr/include/wx-3.2/wx/string.h", 1792
, __FUNCTION__, "!utf8 || !*utf8 || !s.empty()", "string must be valid UTF-8"
), wxTrapInAssert) ) { wxTrapInAssert = false; asm volatile (
"int $3"); } } while ( (void)0, 0 )
1792 "string must be valid UTF-8" )do { if ( !utf8 || !*utf8 || !s.empty() ) { } else if ( wxTheAssertHandler
&& (wxOnAssert("/usr/include/wx-3.2/wx/string.h", 1792
, __FUNCTION__, "!utf8 || !*utf8 || !s.empty()", "string must be valid UTF-8"
), wxTrapInAssert) ) { wxTrapInAssert = false; asm volatile (
"int $3"); } } while ( (void)0, 0 )
;
1793 return s;
1794 }
1795#if wxUSE_STD_STRING1
1796 static wxString FromUTF8(const std::string& utf8)
1797 { return FromUTF8(utf8.c_str(), utf8.length()); }
1798 static wxString FromUTF8Unchecked(const std::string& utf8)
1799 { return FromUTF8Unchecked(utf8.c_str(), utf8.length()); }
1800
1801 std::string utf8_string() const { return ToStdString(wxMBConvUTF8()); }
1802#endif
1803 const wxScopedCharBuffer utf8_str() const { return mb_str(wxMBConvUTF8()); }
1804#else // ANSI
1805 static wxString FromUTF8(const char *utf8)
1806 { return wxString(wxMBConvUTF8().cMB2WC(utf8)); }
1807 static wxString FromUTF8(const char *utf8, size_t len)
1808 {
1809 size_t wlen;
1810 wxScopedWCharBuffer buf(wxMBConvUTF8().cMB2WC(utf8, len == npos ? wxNO_LEN((size_t)-1) : len, &wlen));
1811 return wxString(buf.data(), wlen);
1812 }
1813 static wxString FromUTF8Unchecked(const char *utf8, size_t len = npos)
1814 {
1815 size_t wlen;
1816 wxScopedWCharBuffer buf
1817 (
1818 wxMBConvUTF8().cMB2WC
1819 (
1820 utf8,
1821 len == npos ? wxNO_LEN((size_t)-1) : len,
1822 &wlen
1823 )
1824 );
1825 wxASSERT_MSG( !utf8 || !*utf8 || wlen,do { if ( !utf8 || !*utf8 || wlen ) { } else if ( wxTheAssertHandler
&& (wxOnAssert("/usr/include/wx-3.2/wx/string.h", 1826
, __FUNCTION__, "!utf8 || !*utf8 || wlen", "string must be valid UTF-8"
), wxTrapInAssert) ) { wxTrapInAssert = false; asm volatile (
"int $3"); } } while ( (void)0, 0 )
1826 "string must be valid UTF-8" )do { if ( !utf8 || !*utf8 || wlen ) { } else if ( wxTheAssertHandler
&& (wxOnAssert("/usr/include/wx-3.2/wx/string.h", 1826
, __FUNCTION__, "!utf8 || !*utf8 || wlen", "string must be valid UTF-8"
), wxTrapInAssert) ) { wxTrapInAssert = false; asm volatile (
"int $3"); } } while ( (void)0, 0 )
;
1827
1828 return wxString(buf.data(), wlen);
1829 }
1830#if wxUSE_STD_STRING1
1831 static wxString FromUTF8(const std::string& utf8)
1832 { return FromUTF8(utf8.c_str(), utf8.length()); }
1833 static wxString FromUTF8Unchecked(const std::string& utf8)
1834 { return FromUTF8Unchecked(utf8.c_str(), utf8.length()); }
1835
1836 std::string utf8_string() const { return ToStdString(wxMBConvUTF8()); }
1837#endif
1838 const wxScopedCharBuffer utf8_str() const
1839 {
1840 if (empty())
1841 return wxScopedCharBuffer::CreateNonOwned("", 0);
1842 return wxMBConvUTF8().cWC2MB(wc_str());
1843 }
1844#endif
1845
1846 const wxScopedCharBuffer ToUTF8() const { return utf8_str(); }
1847
1848 // functions for storing binary data in wxString:
1849#if wxUSE_UNICODE1
1850 static wxString From8BitData(const char *data, size_t len)
1851 { return wxString(data, wxConvISO8859_1wxGet_wxConvISO8859_1(), len); }
1852 // version for NUL-terminated data:
1853 static wxString From8BitData(const char *data)
1854 { return wxString(data, wxConvISO8859_1wxGet_wxConvISO8859_1()); }
1855 const wxScopedCharBuffer To8BitData() const
1856 { return mb_str(wxConvISO8859_1wxGet_wxConvISO8859_1()); }
1857#else // ANSI
1858 static wxString From8BitData(const char *data, size_t len)
1859 { return wxString(data, len); }
1860 // version for NUL-terminated data:
1861 static wxString From8BitData(const char *data)
1862 { return wxString(data); }
1863 const wxScopedCharBuffer To8BitData() const
1864 { return wxScopedCharBuffer::CreateNonOwned(wx_str(), length()); }
1865#endif // Unicode/ANSI
1866
1867 // conversions with (possible) format conversions: have to return a
1868 // buffer with temporary data
1869 //
1870 // the functions defined (in either Unicode or ANSI) mode are mb_str() to
1871 // return an ANSI (multibyte) string, wc_str() to return a wide string and
1872 // fn_str() to return a string which should be used with the OS APIs
1873 // accepting the file names. The return value is always the same, but the
1874 // type differs because a function may either return pointer to the buffer
1875 // directly or have to use intermediate buffer for translation.
1876
1877#if wxUSE_UNICODE1
1878
1879 // this is an optimization: even though using mb_str(wxConvLibc) does the
1880 // same thing (i.e. returns pointer to internal representation as locale is
1881 // always an UTF-8 one) in wxUSE_UTF8_LOCALE_ONLY case, we can avoid the
1882 // extra checks and the temporary buffer construction by providing a
1883 // separate mb_str() overload
1884#if wxUSE_UTF8_LOCALE_ONLY0
1885 const char* mb_str() const { return wx_str(); }
1886 const wxScopedCharBuffer mb_str(const wxMBConv& conv) const
1887 {
1888 return AsCharBuf(conv);
1889 }
1890#else // !wxUSE_UTF8_LOCALE_ONLY
1891 const wxScopedCharBuffer mb_str(const wxMBConv& conv wxSTRING_DEFAULT_CONV_ARG= wxGet_wxConvLibc()) const
1892 {
1893 return AsCharBuf(conv);
1894 }
1895#endif // wxUSE_UTF8_LOCALE_ONLY/!wxUSE_UTF8_LOCALE_ONLY
1896
1897 const wxWX2MBbufwxCharBuffer mbc_str() const { return mb_str(*wxConvCurrent); }
1898
1899#if wxUSE_UNICODE_WCHAR1
1900 const wchar_t* wc_str() const { return wx_str(); }
1901#elif wxUSE_UNICODE_UTF80
1902 const wxScopedWCharBuffer wc_str() const
1903 { return AsWCharBuf(wxMBConvStrictUTF8()); }
1904#endif
1905 // for compatibility with !wxUSE_UNICODE version
1906 const wxWX2WCbufwxChar* wc_str(const wxMBConv& WXUNUSED(conv)) const
1907 { return wc_str(); }
1908
1909#if wxMBFILES1
1910 const wxScopedCharBuffer fn_str() const { return mb_str(wxConvFile(*wxConvFileName)); }
1911#else // !wxMBFILES
1912 const wxWX2WCbufwxChar* fn_str() const { return wc_str(); }
1913#endif // wxMBFILES/!wxMBFILES
1914
1915#else // ANSI
1916 const char* mb_str() const { return wx_str(); }
1917
1918 // for compatibility with wxUSE_UNICODE version
1919 const char* mb_str(const wxMBConv& WXUNUSED(conv)) const { return wx_str(); }
1920
1921 const wxWX2MBbufwxCharBuffer mbc_str() const { return mb_str(); }
1922
1923 const wxScopedWCharBuffer wc_str(const wxMBConv& conv wxSTRING_DEFAULT_CONV_ARG= wxGet_wxConvLibc()) const
1924 { return AsWCharBuf(conv); }
1925
1926#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
1927 const wxScopedCharBuffer fn_str() const
1928 { return wxConvFile(*wxConvFileName).cWC2WX( wc_str( wxConvLibcwxGet_wxConvLibc() ) ); }
1929#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
1930#endif // Unicode/ANSI
1931
1932#if wxUSE_UNICODE_UTF80
1933 const wxScopedWCharBuffer t_str() const { return wc_str(); }
1934#elif wxUSE_UNICODE_WCHAR1
1935 const wchar_t* t_str() const { return wx_str(); }
1936#else
1937 const char* t_str() const { return wx_str(); }
1938#endif
1939
1940
1941 // overloaded assignment
1942 // from another wxString
1943 wxString& operator=(const wxString& stringSrc)
1944 {
1945 if ( this != &stringSrc )
1946 {
1947 wxSTRING_INVALIDATE_CACHE();
1948
1949 m_impl = stringSrc.m_impl;
1950 }
1951
1952 return *this;
1953 }
1954
1955#ifdef wxHAS_RVALUE_REF
1956 // move from another wxString
1957 wxString& operator=(wxString&& stringSrc) wxNOEXCEPTnoexcept
1958 {
1959 m_impl = std::move(stringSrc.m_impl);
1960#if wxUSE_STRING_POS_CACHE0
1961 InvalidateCache();
1962 stringSrc.InvalidateCache();
1963#endif // wxUSE_STRING_POS_CACHE
1964
1965 return *this;
1966 }
1967#endif
1968
1969 wxString& operator=(const wxCStrData& cstr)
1970 { return *this = cstr.AsString(); }
1971 // from a character
1972 wxString& operator=(wxUniChar ch)
1973 {
1974 wxSTRING_INVALIDATE_CACHE();
1975
1976 if ( wxStringOperations::IsSingleCodeUnitCharacter(ch) )
1977 m_impl = (wxStringCharType)ch;
1978 else
1979 m_impl = wxStringOperations::EncodeChar(ch);
1980
1981 return *this;
1982 }
1983
1984 wxString& operator=(wxUniCharRef ch)
1985 { return operator=((wxUniChar)ch); }
1986 wxString& operator=(char ch)
1987 { return operator=(wxUniChar(ch)); }
1988 wxString& operator=(unsigned char ch)
1989 { return operator=(wxUniChar(ch)); }
1990 wxString& operator=(wchar_t ch)
1991 { return operator=(wxUniChar(ch)); }
1992 // from a C string - STL probably will crash on NULL,
1993 // so we need to compensate in that case
1994#if wxUSE_STL_BASED_WXSTRING1
1995#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
1996 wxString& operator=(const char *psz)
1997 {
1998 wxSTRING_INVALIDATE_CACHE();
1999
2000 if ( psz )
2001 m_impl = ImplStr(psz);
2002 else
2003 clear();
2004
2005 return *this;
2006 }
2007#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
2008
2009 wxString& operator=(const wchar_t *pwz)
2010 {
2011 wxSTRING_INVALIDATE_CACHE();
2012
2013 if ( pwz )
2014 m_impl = ImplStr(pwz);
2015 else
2016 clear();
2017
2018 return *this;
2019 }
2020#else // !wxUSE_STL_BASED_WXSTRING
2021#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
2022 wxString& operator=(const char *psz)
2023 {
2024 wxSTRING_INVALIDATE_CACHE();
2025
2026 m_impl = ImplStr(psz);
2027
2028 return *this;
2029 }
2030#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
2031
2032 wxString& operator=(const wchar_t *pwz)
2033 {
2034 wxSTRING_INVALIDATE_CACHE();
2035
2036 m_impl = ImplStr(pwz);
2037
2038 return *this;
2039 }
2040#endif // wxUSE_STL_BASED_WXSTRING/!wxUSE_STL_BASED_WXSTRING
2041
2042#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
2043 wxString& operator=(const unsigned char *psz)
2044 { return operator=((const char*)psz); }
2045#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
2046
2047 // from wxScopedWCharBuffer
2048 wxString& operator=(const wxScopedWCharBuffer& s)
2049 { return assign(s); }
2050#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
2051 // from wxScopedCharBuffer
2052 wxString& operator=(const wxScopedCharBuffer& s)
2053 { return assign(s); }
2054#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
2055
2056 // string concatenation
2057 // in place concatenation
2058 /*
2059 Concatenate and return the result. Note that the left to right
2060 associativity of << allows to write things like "str << str1 << str2
2061 << ..." (unlike with +=)
2062 */
2063 // string += string
2064 wxString& operator<<(const wxString& s)
2065 {
2066#if WXWIN_COMPATIBILITY_2_80 && !wxUSE_STL_BASED_WXSTRING1 && !wxUSE_UNICODE_UTF80
2067 wxASSERT_MSG( s.IsValid(),do { if ( s.IsValid() ) { } else if ( wxTheAssertHandler &&
(wxOnAssert("/usr/include/wx-3.2/wx/string.h", 2068, __FUNCTION__
, "s.IsValid()", L"did you forget to call UngetWriteBuf()?"),
wxTrapInAssert) ) { wxTrapInAssert = false; asm volatile ("int $3"
); } } while ( (void)0, 0 )
2068 wxT("did you forget to call UngetWriteBuf()?") )do { if ( s.IsValid() ) { } else if ( wxTheAssertHandler &&
(wxOnAssert("/usr/include/wx-3.2/wx/string.h", 2068, __FUNCTION__
, "s.IsValid()", L"did you forget to call UngetWriteBuf()?"),
wxTrapInAssert) ) { wxTrapInAssert = false; asm volatile ("int $3"
); } } while ( (void)0, 0 )
;
2069#endif
2070
2071 append(s);
2072 return *this;
2073 }
2074 // string += C string
2075#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
2076 wxString& operator<<(const char *psz)
2077 { append(psz); return *this; }
2078#endif
2079 wxString& operator<<(const wchar_t *pwz)
2080 { append(pwz); return *this; }
2081 wxString& operator<<(const wxCStrData& psz)
2082 { append(psz.AsString()); return *this; }
2083 // string += char
2084 wxString& operator<<(wxUniChar ch) { append(1, ch); return *this; }
2085 wxString& operator<<(wxUniCharRef ch) { append(1, ch); return *this; }
2086 wxString& operator<<(char ch) { append(1, ch); return *this; }
2087 wxString& operator<<(unsigned char ch) { append(1, ch); return *this; }
2088 wxString& operator<<(wchar_t ch) { append(1, ch); return *this; }
2089
2090 // string += buffer (i.e. from wxGetString)
2091 wxString& operator<<(const wxScopedWCharBuffer& s)
2092 { return append(s); }
2093#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
2094 wxString& operator<<(const wxScopedCharBuffer& s)
2095 { return append(s); }
2096#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
2097
2098 // string += C string
2099 wxString& Append(const wxString& s)
2100 {
2101 // test for empty() to share the string if possible
2102 if ( empty() )
2103 *this = s;
2104 else
2105 append(s);
2106 return *this;
2107 }
2108#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
2109 wxString& Append(const char* psz)
2110 { append(psz); return *this; }
2111#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
2112 wxString& Append(const wchar_t* pwz)
2113 { append(pwz); return *this; }
2114 wxString& Append(const wxCStrData& psz)
2115 { append(psz); return *this; }
2116#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
2117 wxString& Append(const wxScopedCharBuffer& psz)
2118 { append(psz); return *this; }
2119#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
2120 wxString& Append(const wxScopedWCharBuffer& psz)
2121 { append(psz); return *this; }
2122#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
2123 wxString& Append(const char* psz, size_t nLen)
2124 { append(psz, nLen); return *this; }
2125#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
2126 wxString& Append(const wchar_t* pwz, size_t nLen)
2127 { append(pwz, nLen); return *this; }
2128 wxString& Append(const wxCStrData& psz, size_t nLen)
2129 { append(psz, nLen); return *this; }
2130#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
2131 wxString& Append(const wxScopedCharBuffer& psz, size_t nLen)
2132 { append(psz, nLen); return *this; }
2133#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
2134 wxString& Append(const wxScopedWCharBuffer& psz, size_t nLen)
2135 { append(psz, nLen); return *this; }
2136 // append count copies of given character
2137 wxString& Append(wxUniChar ch, size_t count = 1u)
2138 { append(count, ch); return *this; }
2139 wxString& Append(wxUniCharRef ch, size_t count = 1u)
2140 { append(count, ch); return *this; }
2141 wxString& Append(char ch, size_t count = 1u)
2142 { append(count, ch); return *this; }
2143 wxString& Append(unsigned char ch, size_t count = 1u)
2144 { append(count, ch); return *this; }
2145 wxString& Append(wchar_t ch, size_t count = 1u)
2146 { append(count, ch); return *this; }
2147
2148 // prepend a string, return the string itself
2149 wxString& Prepend(const wxString& str)
2150 { *this = str + *this; return *this; }
2151
2152 // non-destructive concatenation
2153 // two strings
2154 friend wxString WXDLLIMPEXP_BASE__attribute__ ((visibility("default"))) operator+(const wxString& string1,
2155 const wxString& string2);
2156 // string with a single char
2157 friend wxString WXDLLIMPEXP_BASE__attribute__ ((visibility("default"))) operator+(const wxString& string, wxUniChar ch);
2158 // char with a string
2159 friend wxString WXDLLIMPEXP_BASE__attribute__ ((visibility("default"))) operator+(wxUniChar ch, const wxString& string);
2160 // string with C string
2161#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
2162 friend wxString WXDLLIMPEXP_BASE__attribute__ ((visibility("default"))) operator+(const wxString& string,
2163 const char *psz);
2164#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
2165 friend wxString WXDLLIMPEXP_BASE__attribute__ ((visibility("default"))) operator+(const wxString& string,
2166 const wchar_t *pwz);
2167 // C string with string
2168#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
2169 friend wxString WXDLLIMPEXP_BASE__attribute__ ((visibility("default"))) operator+(const char *psz,
2170 const wxString& string);
2171#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
2172 friend wxString WXDLLIMPEXP_BASE__attribute__ ((visibility("default"))) operator+(const wchar_t *pwz,
2173 const wxString& string);
2174
2175 // stream-like functions
2176 // insert an int into string
2177 wxString& operator<<(int i)
2178 { return (*this) << Format(wxT("%d")L"%d", i); }
2179 // insert an unsigned int into string
2180 wxString& operator<<(unsigned int ui)
2181 { return (*this) << Format(wxT("%u")L"%u", ui); }
2182 // insert a long into string
2183 wxString& operator<<(long l)
2184 { return (*this) << Format(wxT("%ld")L"%ld", l); }
2185 // insert an unsigned long into string
2186 wxString& operator<<(unsigned long ul)
2187 { return (*this) << Format(wxT("%lu")L"%lu", ul); }
2188#ifdef wxHAS_LONG_LONG_T_DIFFERENT_FROM_LONG
2189 // insert a long long if they exist and aren't longs
2190 wxString& operator<<(wxLongLong_tlong long ll)
2191 {
2192 return (*this) << Format(wxASCII_STR("%" wxLongLongFmtSpec "d")wxString::FromAscii("%" "ll" "d"), ll);
2193 }
2194 // insert an unsigned long long
2195 wxString& operator<<(wxULongLong_tunsigned long long ull)
2196 {
2197 return (*this) << Format(wxASCII_STR("%" wxLongLongFmtSpec "u")wxString::FromAscii("%" "ll" "u") , ull);
2198 }
2199#endif // wxHAS_LONG_LONG_T_DIFFERENT_FROM_LONG
2200 // insert a float into string
2201 wxString& operator<<(float f)
2202 { return *this << Format(wxS("%f")L"%f", static_cast<double>(f)); }
2203 // insert a double into string
2204 wxString& operator<<(double d)
2205 { return (*this) << Format(wxT("%g")L"%g", d); }
2206
2207 // string comparison
2208 // case-sensitive comparison (returns a value < 0, = 0 or > 0)
2209#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
2210 int Cmp(const char *psz) const
2211 { return compare(psz); }
2212#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
2213 int Cmp(const wchar_t *pwz) const
2214 { return compare(pwz); }
2215 int Cmp(const wxString& s) const
2216 { return compare(s); }
2217 int Cmp(const wxCStrData& s) const
2218 { return compare(s); }
2219#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
2220 int Cmp(const wxScopedCharBuffer& s) const
2221 { return compare(s); }
2222#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
2223 int Cmp(const wxScopedWCharBuffer& s) const
2224 { return compare(s); }
2225 // same as Cmp() but not case-sensitive
2226 int CmpNoCase(const wxString& s) const;
2227
2228 // test for the string equality, either considering case or not
2229 // (if compareWithCase then the case matters)
2230 bool IsSameAs(const wxString& str, bool compareWithCase = true) const
2231 {
2232#if !wxUSE_UNICODE_UTF80
2233 // in UTF-8 build, length() is O(n) and doing this would be _slower_
2234 if ( length() != str.length() )
2235 return false;
2236#endif
2237 return (compareWithCase ? Cmp(str) : CmpNoCase(str)) == 0;
2238 }
2239#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
2240 bool IsSameAs(const char *str, bool compareWithCase = true) const
2241 { return (compareWithCase ? Cmp(str) : CmpNoCase(str)) == 0; }
2242#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
2243 bool IsSameAs(const wchar_t *str, bool compareWithCase = true) const
2244 { return (compareWithCase ? Cmp(str) : CmpNoCase(str)) == 0; }
2245
2246 bool IsSameAs(const wxCStrData& str, bool compareWithCase = true) const
2247 { return IsSameAs(str.AsString(), compareWithCase); }
2248#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
2249 bool IsSameAs(const wxScopedCharBuffer& str, bool compareWithCase = true) const
2250 { return IsSameAs(str.data(), compareWithCase); }
2251#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
2252 bool IsSameAs(const wxScopedWCharBuffer& str, bool compareWithCase = true) const
2253 { return IsSameAs(str.data(), compareWithCase); }
2254 // comparison with a single character: returns true if equal
2255 bool IsSameAs(wxUniChar c, bool compareWithCase = true) const;
2256 // FIXME-UTF8: remove these overloads
2257 bool IsSameAs(wxUniCharRef c, bool compareWithCase = true) const
2258 { return IsSameAs(wxUniChar(c), compareWithCase); }
2259 bool IsSameAs(char c, bool compareWithCase = true) const
2260 { return IsSameAs(wxUniChar(c), compareWithCase); }
2261 bool IsSameAs(unsigned char c, bool compareWithCase = true) const
2262 { return IsSameAs(wxUniChar(c), compareWithCase); }
2263 bool IsSameAs(wchar_t c, bool compareWithCase = true) const
2264 { return IsSameAs(wxUniChar(c), compareWithCase); }
2265 bool IsSameAs(int c, bool compareWithCase = true) const
2266 { return IsSameAs(wxUniChar(c), compareWithCase); }
2267
2268 // simple sub-string extraction
2269 // return substring starting at nFirst of length nCount (or till the end
2270 // if nCount = default value)
2271 wxString Mid(size_t nFirst, size_t nCount = npos) const;
2272
2273 // operator version of Mid()
2274 wxString operator()(size_t start, size_t len) const
2275 { return Mid(start, len); }
2276
2277 // check if the string starts with the given prefix and return the rest
2278 // of the string in the provided pointer if it is not NULL; otherwise
2279 // return false
2280 bool StartsWith(const wxString& prefix, wxString *rest = NULL__null) const;
2281 // check if the string ends with the given suffix and return the
2282 // beginning of the string before the suffix in the provided pointer if
2283 // it is not NULL; otherwise return false
2284 bool EndsWith(const wxString& suffix, wxString *rest = NULL__null) const;
2285
2286 // get first nCount characters
2287 wxString Left(size_t nCount) const;
2288 // get last nCount characters
2289 wxString Right(size_t nCount) const;
2290 // get all characters before the first occurrence of ch
2291 // (returns the whole string if ch not found) and also put everything
2292 // following the first occurrence of ch into rest if it's non-NULL
2293 wxString BeforeFirst(wxUniChar ch, wxString *rest = NULL__null) const;
2294 // get all characters before the last occurrence of ch
2295 // (returns empty string if ch not found) and also put everything
2296 // following the last occurrence of ch into rest if it's non-NULL
2297 wxString BeforeLast(wxUniChar ch, wxString *rest = NULL__null) const;
2298 // get all characters after the first occurrence of ch
2299 // (returns empty string if ch not found)
2300 wxString AfterFirst(wxUniChar ch) const;
2301 // get all characters after the last occurrence of ch
2302 // (returns the whole string if ch not found)
2303 wxString AfterLast(wxUniChar ch) const;
2304
2305 // for compatibility only, use more explicitly named functions above
2306 wxString Before(wxUniChar ch) const { return BeforeLast(ch); }
2307 wxString After(wxUniChar ch) const { return AfterFirst(ch); }
2308
2309 // case conversion
2310 // convert to upper case in place, return the string itself
2311 wxString& MakeUpper();
2312 // convert to upper case, return the copy of the string
2313 wxString Upper() const { return wxString(*this).MakeUpper(); }
2314 // convert to lower case in place, return the string itself
2315 wxString& MakeLower();
2316 // convert to lower case, return the copy of the string
2317 wxString Lower() const { return wxString(*this).MakeLower(); }
2318 // convert the first character to the upper case and the rest to the
2319 // lower one, return the modified string itself
2320 wxString& MakeCapitalized();
2321 // convert the first character to the upper case and the rest to the
2322 // lower one, return the copy of the string
2323 wxString Capitalize() const { return wxString(*this).MakeCapitalized(); }
2324
2325 // trimming/padding whitespace (either side) and truncating
2326 // remove spaces from left or from right (default) side
2327 wxString& Trim(bool bFromRight = true);
2328 // add nCount copies chPad in the beginning or at the end (default)
2329 wxString& Pad(size_t nCount, wxUniChar chPad = wxT(' ')L' ', bool bFromRight = true);
2330
2331 // searching and replacing
2332 // searching (return starting index, or -1 if not found)
2333 int Find(wxUniChar ch, bool bFromEnd = false) const; // like strchr/strrchr
2334 int Find(wxUniCharRef ch, bool bFromEnd = false) const
2335 { return Find(wxUniChar(ch), bFromEnd); }
2336 int Find(char ch, bool bFromEnd = false) const
2337 { return Find(wxUniChar(ch), bFromEnd); }
2338 int Find(unsigned char ch, bool bFromEnd = false) const
2339 { return Find(wxUniChar(ch), bFromEnd); }
2340 int Find(wchar_t ch, bool bFromEnd = false) const
2341 { return Find(wxUniChar(ch), bFromEnd); }
2342 // searching (return starting index, or -1 if not found)
2343 int Find(const wxString& sub) const // like strstr
2344 {
2345 const size_type idx = find(sub);
2346 return (idx == npos) ? wxNOT_FOUND(-1) : (int)idx;
2347 }
2348#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
2349 int Find(const char *sub) const // like strstr
2350 {
2351 const size_type idx = find(sub);
2352 return (idx == npos) ? wxNOT_FOUND(-1) : (int)idx;
2353 }
2354#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
2355 int Find(const wchar_t *sub) const // like strstr
2356 {
2357 const size_type idx = find(sub);
2358 return (idx == npos) ? wxNOT_FOUND(-1) : (int)idx;
2359 }
2360
2361 int Find(const wxCStrData& sub) const
2362 { return Find(sub.AsString()); }
2363#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
2364 int Find(const wxScopedCharBuffer& sub) const
2365 { return Find(sub.data()); }
2366#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
2367 int Find(const wxScopedWCharBuffer& sub) const
2368 { return Find(sub.data()); }
2369
2370 // replace first (or all of bReplaceAll) occurrences of substring with
2371 // another string, returns the number of replacements made
2372 size_t Replace(const wxString& strOld,
2373 const wxString& strNew,
2374 bool bReplaceAll = true);
2375
2376 // check if the string contents matches a mask containing '*' and '?'
2377 bool Matches(const wxString& mask) const;
2378
2379 // conversion to numbers: all functions return true only if the whole
2380 // string is a number and put the value of this number into the pointer
2381 // provided, the base is the numeric base in which the conversion should be
2382 // done and must be comprised between 2 and 36 or be 0 in which case the
2383 // standard C rules apply (leading '0' => octal, "0x" => hex)
2384
2385 // convert to a signed integer
2386 bool ToInt(int *val, int base = 10) const;
2387 // convert to an unsigned integer
2388 bool ToUInt(unsigned int *val, int base = 10) const;
2389 // convert to a signed long
2390 bool ToLong(long *val, int base = 10) const;
2391 // convert to an unsigned long
2392 bool ToULong(unsigned long *val, int base = 10) const;
2393 // convert to wxLongLong
2394#if defined(wxLongLong_tlong long)
2395 bool ToLongLong(wxLongLong_tlong long *val, int base = 10) const;
2396 // convert to wxULongLong
2397 bool ToULongLong(wxULongLong_tunsigned long long *val, int base = 10) const;
2398#endif // wxLongLong_t
2399 // convert to a double
2400 bool ToDouble(double *val) const;
2401
2402 // conversions to numbers using C locale
2403 // convert to a signed integer
2404 bool ToCLong(long *val, int base = 10) const;
2405 // convert to an unsigned integer
2406 bool ToCULong(unsigned long *val, int base = 10) const;
2407 // convert to a double
2408 bool ToCDouble(double *val) const;
2409
2410 // create a string representing the given floating point number with the
2411 // default (like %g) or fixed (if precision >=0) precision
2412 // in the current locale
2413 static wxString FromDouble(double val, int precision = -1);
2414 // in C locale
2415 static wxString FromCDouble(double val, int precision = -1);
2416
2417 // formatted input/output
2418 // as sprintf(), returns the number of characters written or < 0 on error
2419 // (take 'this' into account in attribute parameter count)
2420 // int Printf(const wxString& format, ...);
2421 WX_DEFINE_VARARG_FUNC(int, Printf, 1, (const wxFormatString&),inline int Printf(const wxFormatString& f1) { return DoPrintfWchar
(f1); } template<typename T1> int Printf(const wxFormatString
& f1, T1 a1) { typedef const wxFormatString& TF1; const
wxFormatString *fmt = ((wxFormatStringArgumentFinder<TF1>
::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar<
T1>(a1, fmt, 1).get()); } template<typename T1, typename
T2> int Printf(const wxFormatString& f1, T1 a1, T2 a2
) { typedef const wxFormatString& TF1; const wxFormatString
*fmt = ((wxFormatStringArgumentFinder<TF1>::find(f1)))
; return DoPrintfWchar(f1, wxArgNormalizerWchar<T1>(a1,
fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt, 2).get
()); } template<typename T1, typename T2, typename T3> int
Printf(const wxFormatString& f1, T1 a1, T2 a2, T3 a3) { typedef
const wxFormatString& TF1; const wxFormatString *fmt = (
(wxFormatStringArgumentFinder<TF1>::find(f1))); return DoPrintfWchar
(f1, wxArgNormalizerWchar<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar
<T2>(a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(
a3, fmt, 3).get()); } template<typename T1, typename T2, typename
T3, typename T4> int Printf(const wxFormatString& f1,
T1 a1, T2 a2, T3 a3, T4 a4) { typedef const wxFormatString&
TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get()); } template
<typename T1, typename T2, typename T3, typename T4, typename
T5> int Printf(const wxFormatString& f1, T1 a1, T2 a2
, T3 a3, T4 a4, T5 a5) { typedef const wxFormatString& TF1
; const wxFormatString *fmt = ((wxFormatStringArgumentFinder<
TF1>::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get()); } template<typename T1, typename
T2, typename T3, typename T4, typename T5, typename T6> int
Printf(const wxFormatString& f1, T1 a1, T2 a2, T3 a3, T4
a4, T5 a5, T6 a6) { typedef const wxFormatString& TF1; const
wxFormatString *fmt = ((wxFormatStringArgumentFinder<TF1>
::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar<
T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt
, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(),
wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get()); } template<typename T1, typename T2, typename
T3, typename T4, typename T5, typename T6, typename T7> int
Printf(const wxFormatString& f1, T1 a1, T2 a2, T3 a3, T4
a4, T5 a5, T6 a6, T7 a7) { typedef const wxFormatString&
TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get()); } template<typename T1, typename T2, typename T3,
typename T4, typename T5, typename T6, typename T7, typename
T8> int Printf(const wxFormatString& f1, T1 a1, T2 a2
, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8) { typedef const wxFormatString
& TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get()); } template
<typename T1, typename T2, typename T3, typename T4, typename
T5, typename T6, typename T7, typename T8, typename T9> int
Printf(const wxFormatString& f1, T1 a1, T2 a2, T3 a3, T4
a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9) { typedef const wxFormatString
& TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get()); } template<typename T1, typename
T2, typename T3, typename T4, typename T5, typename T6, typename
T7, typename T8, typename T9, typename T10> int Printf(const
wxFormatString& f1, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6
a6, T7 a7, T8 a8, T9 a9, T10 a10) { typedef const wxFormatString
& TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get()); } template<typename T1, typename T2
, typename T3, typename T4, typename T5, typename T6, typename
T7, typename T8, typename T9, typename T10, typename T11>
int Printf(const wxFormatString& f1, T1 a1, T2 a2, T3 a3
, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11)
{ typedef const wxFormatString& TF1; const wxFormatString
*fmt = ((wxFormatStringArgumentFinder<TF1>::find(f1)))
; return DoPrintfWchar(f1, wxArgNormalizerWchar<T1>(a1,
fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt, 2).get
(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(), wxArgNormalizerWchar
<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar<T5>(
a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(a6, fmt, 6)
.get(), wxArgNormalizerWchar<T7>(a7, fmt, 7).get(), wxArgNormalizerWchar
<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar<T9>(
a9, fmt, 9).get(), wxArgNormalizerWchar<T10>(a10, fmt, 10
).get(), wxArgNormalizerWchar<T11>(a11, fmt, 11).get())
; } template<typename T1, typename T2, typename T3, typename
T4, typename T5, typename T6, typename T7, typename T8, typename
T9, typename T10, typename T11, typename T12> int Printf(
const wxFormatString& f1, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5
, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12) { typedef
const wxFormatString& TF1; const wxFormatString *fmt = (
(wxFormatStringArgumentFinder<TF1>::find(f1))); return DoPrintfWchar
(f1, wxArgNormalizerWchar<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar
<T2>(a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(
a3, fmt, 3).get(), wxArgNormalizerWchar<T4>(a4, fmt, 4)
.get(), wxArgNormalizerWchar<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar
<T6>(a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(
a7, fmt, 7).get(), wxArgNormalizerWchar<T8>(a8, fmt, 8)
.get(), wxArgNormalizerWchar<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar
<T10>(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>
(a11, fmt, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt
, 12).get()); } template<typename T1, typename T2, typename
T3, typename T4, typename T5, typename T6, typename T7, typename
T8, typename T9, typename T10, typename T11, typename T12, typename
T13> int Printf(const wxFormatString& f1, T1 a1, T2 a2
, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11
a11, T12 a12, T13 a13) { typedef const wxFormatString& TF1
; const wxFormatString *fmt = ((wxFormatStringArgumentFinder<
TF1>::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get()); } template
<typename T1, typename T2, typename T3, typename T4, typename
T5, typename T6, typename T7, typename T8, typename T9, typename
T10, typename T11, typename T12, typename T13, typename T14>
int Printf(const wxFormatString& f1, T1 a1, T2 a2, T3 a3
, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11,
T12 a12, T13 a13, T14 a14) { typedef const wxFormatString&
TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get()); } template<typename T1, typename
T2, typename T3, typename T4, typename T5, typename T6, typename
T7, typename T8, typename T9, typename T10, typename T11, typename
T12, typename T13, typename T14, typename T15> int Printf
(const wxFormatString& f1, T1 a1, T2 a2, T3 a3, T4 a4, T5
a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13
a13, T14 a14, T15 a15) { typedef const wxFormatString& TF1
; const wxFormatString *fmt = ((wxFormatStringArgumentFinder<
TF1>::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>
(a15, fmt, 15).get()); } template<typename T1, typename T2
, typename T3, typename T4, typename T5, typename T6, typename
T7, typename T8, typename T9, typename T10, typename T11, typename
T12, typename T13, typename T14, typename T15, typename T16>
int Printf(const wxFormatString& f1, T1 a1, T2 a2, T3 a3
, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11,
T12 a12, T13 a13, T14 a14, T15 a15, T16 a16) { typedef const
wxFormatString& TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>
(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt
, 16).get()); } template<typename T1, typename T2, typename
T3, typename T4, typename T5, typename T6, typename T7, typename
T8, typename T9, typename T10, typename T11, typename T12, typename
T13, typename T14, typename T15, typename T16, typename T17>
int Printf(const wxFormatString& f1, T1 a1, T2 a2, T3 a3
, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11,
T12 a12, T13 a13, T14 a14, T15 a15, T16 a16, T17 a17) { typedef
const wxFormatString& TF1; const wxFormatString *fmt = (
(wxFormatStringArgumentFinder<TF1>::find(f1))); return DoPrintfWchar
(f1, wxArgNormalizerWchar<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar
<T2>(a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(
a3, fmt, 3).get(), wxArgNormalizerWchar<T4>(a4, fmt, 4)
.get(), wxArgNormalizerWchar<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar
<T6>(a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(
a7, fmt, 7).get(), wxArgNormalizerWchar<T8>(a8, fmt, 8)
.get(), wxArgNormalizerWchar<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar
<T10>(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>
(a11, fmt, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt
, 12).get(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get
(), wxArgNormalizerWchar<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar
<T15>(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>
(a16, fmt, 16).get(), wxArgNormalizerWchar<T17>(a17, fmt
, 17).get()); } template<typename T1, typename T2, typename
T3, typename T4, typename T5, typename T6, typename T7, typename
T8, typename T9, typename T10, typename T11, typename T12, typename
T13, typename T14, typename T15, typename T16, typename T17,
typename T18> int Printf(const wxFormatString& f1, T1
a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10
a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16, T17
a17, T18 a18) { typedef const wxFormatString& TF1; const
wxFormatString *fmt = ((wxFormatStringArgumentFinder<TF1>
::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar<
T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt
, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(),
wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>
(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt
, 16).get(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get
(), wxArgNormalizerWchar<T18>(a18, fmt, 18).get()); } template
<typename T1, typename T2, typename T3, typename T4, typename
T5, typename T6, typename T7, typename T8, typename T9, typename
T10, typename T11, typename T12, typename T13, typename T14,
typename T15, typename T16, typename T17, typename T18, typename
T19> int Printf(const wxFormatString& f1, T1 a1, T2 a2
, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11
a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16, T17 a17, T18
a18, T19 a19) { typedef const wxFormatString& TF1; const
wxFormatString *fmt = ((wxFormatStringArgumentFinder<TF1>
::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar<
T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt
, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(),
wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>
(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt
, 16).get(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get
(), wxArgNormalizerWchar<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar
<T19>(a19, fmt, 19).get()); } template<typename T1, typename
T2, typename T3, typename T4, typename T5, typename T6, typename
T7, typename T8, typename T9, typename T10, typename T11, typename
T12, typename T13, typename T14, typename T15, typename T16,
typename T17, typename T18, typename T19, typename T20> int
Printf(const wxFormatString& f1, T1 a1, T2 a2, T3 a3, T4
a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12
a12, T13 a13, T14 a14, T15 a15, T16 a16, T17 a17, T18 a18, T19
a19, T20 a20) { typedef const wxFormatString& TF1; const
wxFormatString *fmt = ((wxFormatStringArgumentFinder<TF1>
::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar<
T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt
, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(),
wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>
(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt
, 16).get(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get
(), wxArgNormalizerWchar<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar
<T19>(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>
(a20, fmt, 20).get()); } template<typename T1, typename T2
, typename T3, typename T4, typename T5, typename T6, typename
T7, typename T8, typename T9, typename T10, typename T11, typename
T12, typename T13, typename T14, typename T15, typename T16,
typename T17, typename T18, typename T19, typename T20, typename
T21> int Printf(const wxFormatString& f1, T1 a1, T2 a2
, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11
a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16, T17 a17, T18
a18, T19 a19, T20 a20, T21 a21) { typedef const wxFormatString
& TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>
(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt
, 16).get(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get
(), wxArgNormalizerWchar<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar
<T19>(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>
(a20, fmt, 20).get(), wxArgNormalizerWchar<T21>(a21, fmt
, 21).get()); } template<typename T1, typename T2, typename
T3, typename T4, typename T5, typename T6, typename T7, typename
T8, typename T9, typename T10, typename T11, typename T12, typename
T13, typename T14, typename T15, typename T16, typename T17,
typename T18, typename T19, typename T20, typename T21, typename
T22> int Printf(const wxFormatString& f1, T1 a1, T2 a2
, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11
a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16, T17 a17, T18
a18, T19 a19, T20 a20, T21 a21, T22 a22) { typedef const wxFormatString
& TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>
(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt
, 16).get(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get
(), wxArgNormalizerWchar<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar
<T19>(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>
(a20, fmt, 20).get(), wxArgNormalizerWchar<T21>(a21, fmt
, 21).get(), wxArgNormalizerWchar<T22>(a22, fmt, 22).get
()); } template<typename T1, typename T2, typename T3, typename
T4, typename T5, typename T6, typename T7, typename T8, typename
T9, typename T10, typename T11, typename T12, typename T13, typename
T14, typename T15, typename T16, typename T17, typename T18,
typename T19, typename T20, typename T21, typename T22, typename
T23> int Printf(const wxFormatString& f1, T1 a1, T2 a2
, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11
a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16, T17 a17, T18
a18, T19 a19, T20 a20, T21 a21, T22 a22, T23 a23) { typedef const
wxFormatString& TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>
(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt
, 16).get(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get
(), wxArgNormalizerWchar<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar
<T19>(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>
(a20, fmt, 20).get(), wxArgNormalizerWchar<T21>(a21, fmt
, 21).get(), wxArgNormalizerWchar<T22>(a22, fmt, 22).get
(), wxArgNormalizerWchar<T23>(a23, fmt, 23).get()); } template
<typename T1, typename T2, typename T3, typename T4, typename
T5, typename T6, typename T7, typename T8, typename T9, typename
T10, typename T11, typename T12, typename T13, typename T14,
typename T15, typename T16, typename T17, typename T18, typename
T19, typename T20, typename T21, typename T22, typename T23,
typename T24> int Printf(const wxFormatString& f1, T1
a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10
a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16, T17
a17, T18 a18, T19 a19, T20 a20, T21 a21, T22 a22, T23 a23, T24
a24) { typedef const wxFormatString& TF1; const wxFormatString
*fmt = ((wxFormatStringArgumentFinder<TF1>::find(f1)))
; return DoPrintfWchar(f1, wxArgNormalizerWchar<T1>(a1,
fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt, 2).get
(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(), wxArgNormalizerWchar
<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar<T5>(
a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(a6, fmt, 6)
.get(), wxArgNormalizerWchar<T7>(a7, fmt, 7).get(), wxArgNormalizerWchar
<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar<T9>(
a9, fmt, 9).get(), wxArgNormalizerWchar<T10>(a10, fmt, 10
).get(), wxArgNormalizerWchar<T11>(a11, fmt, 11).get(),
wxArgNormalizerWchar<T12>(a12, fmt, 12).get(), wxArgNormalizerWchar
<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar<T14>
(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>(a15, fmt
, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt, 16).get
(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get(), wxArgNormalizerWchar
<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar<T19>
(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>(a20, fmt
, 20).get(), wxArgNormalizerWchar<T21>(a21, fmt, 21).get
(), wxArgNormalizerWchar<T22>(a22, fmt, 22).get(), wxArgNormalizerWchar
<T23>(a23, fmt, 23).get(), wxArgNormalizerWchar<T24>
(a24, fmt, 24).get()); } template<typename T1, typename T2
, typename T3, typename T4, typename T5, typename T6, typename
T7, typename T8, typename T9, typename T10, typename T11, typename
T12, typename T13, typename T14, typename T15, typename T16,
typename T17, typename T18, typename T19, typename T20, typename
T21, typename T22, typename T23, typename T24, typename T25>
int Printf(const wxFormatString& f1, T1 a1, T2 a2, T3 a3
, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11,
T12 a12, T13 a13, T14 a14, T15 a15, T16 a16, T17 a17, T18 a18
, T19 a19, T20 a20, T21 a21, T22 a22, T23 a23, T24 a24, T25 a25
) { typedef const wxFormatString& TF1; const wxFormatString
*fmt = ((wxFormatStringArgumentFinder<TF1>::find(f1)))
; return DoPrintfWchar(f1, wxArgNormalizerWchar<T1>(a1,
fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt, 2).get
(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(), wxArgNormalizerWchar
<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar<T5>(
a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(a6, fmt, 6)
.get(), wxArgNormalizerWchar<T7>(a7, fmt, 7).get(), wxArgNormalizerWchar
<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar<T9>(
a9, fmt, 9).get(), wxArgNormalizerWchar<T10>(a10, fmt, 10
).get(), wxArgNormalizerWchar<T11>(a11, fmt, 11).get(),
wxArgNormalizerWchar<T12>(a12, fmt, 12).get(), wxArgNormalizerWchar
<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar<T14>
(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>(a15, fmt
, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt, 16).get
(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get(), wxArgNormalizerWchar
<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar<T19>
(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>(a20, fmt
, 20).get(), wxArgNormalizerWchar<T21>(a21, fmt, 21).get
(), wxArgNormalizerWchar<T22>(a22, fmt, 22).get(), wxArgNormalizerWchar
<T23>(a23, fmt, 23).get(), wxArgNormalizerWchar<T24>
(a24, fmt, 24).get(), wxArgNormalizerWchar<T25>(a25, fmt
, 25).get()); } template<typename T1, typename T2, typename
T3, typename T4, typename T5, typename T6, typename T7, typename
T8, typename T9, typename T10, typename T11, typename T12, typename
T13, typename T14, typename T15, typename T16, typename T17,
typename T18, typename T19, typename T20, typename T21, typename
T22, typename T23, typename T24, typename T25, typename T26>
int Printf(const wxFormatString& f1, T1 a1, T2 a2, T3 a3
, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11,
T12 a12, T13 a13, T14 a14, T15 a15, T16 a16, T17 a17, T18 a18
, T19 a19, T20 a20, T21 a21, T22 a22, T23 a23, T24 a24, T25 a25
, T26 a26) { typedef const wxFormatString& TF1; const wxFormatString
*fmt = ((wxFormatStringArgumentFinder<TF1>::find(f1)))
; return DoPrintfWchar(f1, wxArgNormalizerWchar<T1>(a1,
fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt, 2).get
(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(), wxArgNormalizerWchar
<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar<T5>(
a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(a6, fmt, 6)
.get(), wxArgNormalizerWchar<T7>(a7, fmt, 7).get(), wxArgNormalizerWchar
<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar<T9>(
a9, fmt, 9).get(), wxArgNormalizerWchar<T10>(a10, fmt, 10
).get(), wxArgNormalizerWchar<T11>(a11, fmt, 11).get(),
wxArgNormalizerWchar<T12>(a12, fmt, 12).get(), wxArgNormalizerWchar
<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar<T14>
(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>(a15, fmt
, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt, 16).get
(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get(), wxArgNormalizerWchar
<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar<T19>
(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>(a20, fmt
, 20).get(), wxArgNormalizerWchar<T21>(a21, fmt, 21).get
(), wxArgNormalizerWchar<T22>(a22, fmt, 22).get(), wxArgNormalizerWchar
<T23>(a23, fmt, 23).get(), wxArgNormalizerWchar<T24>
(a24, fmt, 24).get(), wxArgNormalizerWchar<T25>(a25, fmt
, 25).get(), wxArgNormalizerWchar<T26>(a26, fmt, 26).get
()); } template<typename T1, typename T2, typename T3, typename
T4, typename T5, typename T6, typename T7, typename T8, typename
T9, typename T10, typename T11, typename T12, typename T13, typename
T14, typename T15, typename T16, typename T17, typename T18,
typename T19, typename T20, typename T21, typename T22, typename
T23, typename T24, typename T25, typename T26, typename T27>
int Printf(const wxFormatString& f1, T1 a1, T2 a2, T3 a3
, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11,
T12 a12, T13 a13, T14 a14, T15 a15, T16 a16, T17 a17, T18 a18
, T19 a19, T20 a20, T21 a21, T22 a22, T23 a23, T24 a24, T25 a25
, T26 a26, T27 a27) { typedef const wxFormatString& TF1; const
wxFormatString *fmt = ((wxFormatStringArgumentFinder<TF1>
::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar<
T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt
, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(),
wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>
(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt
, 16).get(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get
(), wxArgNormalizerWchar<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar
<T19>(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>
(a20, fmt, 20).get(), wxArgNormalizerWchar<T21>(a21, fmt
, 21).get(), wxArgNormalizerWchar<T22>(a22, fmt, 22).get
(), wxArgNormalizerWchar<T23>(a23, fmt, 23).get(), wxArgNormalizerWchar
<T24>(a24, fmt, 24).get(), wxArgNormalizerWchar<T25>
(a25, fmt, 25).get(), wxArgNormalizerWchar<T26>(a26, fmt
, 26).get(), wxArgNormalizerWchar<T27>(a27, fmt, 27).get
()); } template<typename T1, typename T2, typename T3, typename
T4, typename T5, typename T6, typename T7, typename T8, typename
T9, typename T10, typename T11, typename T12, typename T13, typename
T14, typename T15, typename T16, typename T17, typename T18,
typename T19, typename T20, typename T21, typename T22, typename
T23, typename T24, typename T25, typename T26, typename T27,
typename T28> int Printf(const wxFormatString& f1, T1
a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10
a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16, T17
a17, T18 a18, T19 a19, T20 a20, T21 a21, T22 a22, T23 a23, T24
a24, T25 a25, T26 a26, T27 a27, T28 a28) { typedef const wxFormatString
& TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>
(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt
, 16).get(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get
(), wxArgNormalizerWchar<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar
<T19>(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>
(a20, fmt, 20).get(), wxArgNormalizerWchar<T21>(a21, fmt
, 21).get(), wxArgNormalizerWchar<T22>(a22, fmt, 22).get
(), wxArgNormalizerWchar<T23>(a23, fmt, 23).get(), wxArgNormalizerWchar
<T24>(a24, fmt, 24).get(), wxArgNormalizerWchar<T25>
(a25, fmt, 25).get(), wxArgNormalizerWchar<T26>(a26, fmt
, 26).get(), wxArgNormalizerWchar<T27>(a27, fmt, 27).get
(), wxArgNormalizerWchar<T28>(a28, fmt, 28).get()); } template
<typename T1, typename T2, typename T3, typename T4, typename
T5, typename T6, typename T7, typename T8, typename T9, typename
T10, typename T11, typename T12, typename T13, typename T14,
typename T15, typename T16, typename T17, typename T18, typename
T19, typename T20, typename T21, typename T22, typename T23,
typename T24, typename T25, typename T26, typename T27, typename
T28, typename T29> int Printf(const wxFormatString& f1
, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9
, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16
, T17 a17, T18 a18, T19 a19, T20 a20, T21 a21, T22 a22, T23 a23
, T24 a24, T25 a25, T26 a26, T27 a27, T28 a28, T29 a29) { typedef
const wxFormatString& TF1; const wxFormatString *fmt = (
(wxFormatStringArgumentFinder<TF1>::find(f1))); return DoPrintfWchar
(f1, wxArgNormalizerWchar<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar
<T2>(a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(
a3, fmt, 3).get(), wxArgNormalizerWchar<T4>(a4, fmt, 4)
.get(), wxArgNormalizerWchar<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar
<T6>(a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(
a7, fmt, 7).get(), wxArgNormalizerWchar<T8>(a8, fmt, 8)
.get(), wxArgNormalizerWchar<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar
<T10>(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>
(a11, fmt, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt
, 12).get(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get
(), wxArgNormalizerWchar<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar
<T15>(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>
(a16, fmt, 16).get(), wxArgNormalizerWchar<T17>(a17, fmt
, 17).get(), wxArgNormalizerWchar<T18>(a18, fmt, 18).get
(), wxArgNormalizerWchar<T19>(a19, fmt, 19).get(), wxArgNormalizerWchar
<T20>(a20, fmt, 20).get(), wxArgNormalizerWchar<T21>
(a21, fmt, 21).get(), wxArgNormalizerWchar<T22>(a22, fmt
, 22).get(), wxArgNormalizerWchar<T23>(a23, fmt, 23).get
(), wxArgNormalizerWchar<T24>(a24, fmt, 24).get(), wxArgNormalizerWchar
<T25>(a25, fmt, 25).get(), wxArgNormalizerWchar<T26>
(a26, fmt, 26).get(), wxArgNormalizerWchar<T27>(a27, fmt
, 27).get(), wxArgNormalizerWchar<T28>(a28, fmt, 28).get
(), wxArgNormalizerWchar<T29>(a29, fmt, 29).get()); } template
<typename T1, typename T2, typename T3, typename T4, typename
T5, typename T6, typename T7, typename T8, typename T9, typename
T10, typename T11, typename T12, typename T13, typename T14,
typename T15, typename T16, typename T17, typename T18, typename
T19, typename T20, typename T21, typename T22, typename T23,
typename T24, typename T25, typename T26, typename T27, typename
T28, typename T29, typename T30> int Printf(const wxFormatString
& f1, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8
a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15
, T16 a16, T17 a17, T18 a18, T19 a19, T20 a20, T21 a21, T22 a22
, T23 a23, T24 a24, T25 a25, T26 a26, T27 a27, T28 a28, T29 a29
, T30 a30) { typedef const wxFormatString& TF1; const wxFormatString
*fmt = ((wxFormatStringArgumentFinder<TF1>::find(f1)))
; return DoPrintfWchar(f1, wxArgNormalizerWchar<T1>(a1,
fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt, 2).get
(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(), wxArgNormalizerWchar
<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar<T5>(
a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(a6, fmt, 6)
.get(), wxArgNormalizerWchar<T7>(a7, fmt, 7).get(), wxArgNormalizerWchar
<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar<T9>(
a9, fmt, 9).get(), wxArgNormalizerWchar<T10>(a10, fmt, 10
).get(), wxArgNormalizerWchar<T11>(a11, fmt, 11).get(),
wxArgNormalizerWchar<T12>(a12, fmt, 12).get(), wxArgNormalizerWchar
<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar<T14>
(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>(a15, fmt
, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt, 16).get
(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get(), wxArgNormalizerWchar
<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar<T19>
(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>(a20, fmt
, 20).get(), wxArgNormalizerWchar<T21>(a21, fmt, 21).get
(), wxArgNormalizerWchar<T22>(a22, fmt, 22).get(), wxArgNormalizerWchar
<T23>(a23, fmt, 23).get(), wxArgNormalizerWchar<T24>
(a24, fmt, 24).get(), wxArgNormalizerWchar<T25>(a25, fmt
, 25).get(), wxArgNormalizerWchar<T26>(a26, fmt, 26).get
(), wxArgNormalizerWchar<T27>(a27, fmt, 27).get(), wxArgNormalizerWchar
<T28>(a28, fmt, 28).get(), wxArgNormalizerWchar<T29>
(a29, fmt, 29).get(), wxArgNormalizerWchar<T30>(a30, fmt
, 30).get()); }
2422 DoPrintfWchar, DoPrintfUtf8)inline int Printf(const wxFormatString& f1) { return DoPrintfWchar
(f1); } template<typename T1> int Printf(const wxFormatString
& f1, T1 a1) { typedef const wxFormatString& TF1; const
wxFormatString *fmt = ((wxFormatStringArgumentFinder<TF1>
::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar<
T1>(a1, fmt, 1).get()); } template<typename T1, typename
T2> int Printf(const wxFormatString& f1, T1 a1, T2 a2
) { typedef const wxFormatString& TF1; const wxFormatString
*fmt = ((wxFormatStringArgumentFinder<TF1>::find(f1)))
; return DoPrintfWchar(f1, wxArgNormalizerWchar<T1>(a1,
fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt, 2).get
()); } template<typename T1, typename T2, typename T3> int
Printf(const wxFormatString& f1, T1 a1, T2 a2, T3 a3) { typedef
const wxFormatString& TF1; const wxFormatString *fmt = (
(wxFormatStringArgumentFinder<TF1>::find(f1))); return DoPrintfWchar
(f1, wxArgNormalizerWchar<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar
<T2>(a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(
a3, fmt, 3).get()); } template<typename T1, typename T2, typename
T3, typename T4> int Printf(const wxFormatString& f1,
T1 a1, T2 a2, T3 a3, T4 a4) { typedef const wxFormatString&
TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get()); } template
<typename T1, typename T2, typename T3, typename T4, typename
T5> int Printf(const wxFormatString& f1, T1 a1, T2 a2
, T3 a3, T4 a4, T5 a5) { typedef const wxFormatString& TF1
; const wxFormatString *fmt = ((wxFormatStringArgumentFinder<
TF1>::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get()); } template<typename T1, typename
T2, typename T3, typename T4, typename T5, typename T6> int
Printf(const wxFormatString& f1, T1 a1, T2 a2, T3 a3, T4
a4, T5 a5, T6 a6) { typedef const wxFormatString& TF1; const
wxFormatString *fmt = ((wxFormatStringArgumentFinder<TF1>
::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar<
T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt
, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(),
wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get()); } template<typename T1, typename T2, typename
T3, typename T4, typename T5, typename T6, typename T7> int
Printf(const wxFormatString& f1, T1 a1, T2 a2, T3 a3, T4
a4, T5 a5, T6 a6, T7 a7) { typedef const wxFormatString&
TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get()); } template<typename T1, typename T2, typename T3,
typename T4, typename T5, typename T6, typename T7, typename
T8> int Printf(const wxFormatString& f1, T1 a1, T2 a2
, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8) { typedef const wxFormatString
& TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get()); } template
<typename T1, typename T2, typename T3, typename T4, typename
T5, typename T6, typename T7, typename T8, typename T9> int
Printf(const wxFormatString& f1, T1 a1, T2 a2, T3 a3, T4
a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9) { typedef const wxFormatString
& TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get()); } template<typename T1, typename
T2, typename T3, typename T4, typename T5, typename T6, typename
T7, typename T8, typename T9, typename T10> int Printf(const
wxFormatString& f1, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6
a6, T7 a7, T8 a8, T9 a9, T10 a10) { typedef const wxFormatString
& TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get()); } template<typename T1, typename T2
, typename T3, typename T4, typename T5, typename T6, typename
T7, typename T8, typename T9, typename T10, typename T11>
int Printf(const wxFormatString& f1, T1 a1, T2 a2, T3 a3
, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11)
{ typedef const wxFormatString& TF1; const wxFormatString
*fmt = ((wxFormatStringArgumentFinder<TF1>::find(f1)))
; return DoPrintfWchar(f1, wxArgNormalizerWchar<T1>(a1,
fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt, 2).get
(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(), wxArgNormalizerWchar
<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar<T5>(
a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(a6, fmt, 6)
.get(), wxArgNormalizerWchar<T7>(a7, fmt, 7).get(), wxArgNormalizerWchar
<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar<T9>(
a9, fmt, 9).get(), wxArgNormalizerWchar<T10>(a10, fmt, 10
).get(), wxArgNormalizerWchar<T11>(a11, fmt, 11).get())
; } template<typename T1, typename T2, typename T3, typename
T4, typename T5, typename T6, typename T7, typename T8, typename
T9, typename T10, typename T11, typename T12> int Printf(
const wxFormatString& f1, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5
, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12) { typedef
const wxFormatString& TF1; const wxFormatString *fmt = (
(wxFormatStringArgumentFinder<TF1>::find(f1))); return DoPrintfWchar
(f1, wxArgNormalizerWchar<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar
<T2>(a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(
a3, fmt, 3).get(), wxArgNormalizerWchar<T4>(a4, fmt, 4)
.get(), wxArgNormalizerWchar<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar
<T6>(a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(
a7, fmt, 7).get(), wxArgNormalizerWchar<T8>(a8, fmt, 8)
.get(), wxArgNormalizerWchar<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar
<T10>(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>
(a11, fmt, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt
, 12).get()); } template<typename T1, typename T2, typename
T3, typename T4, typename T5, typename T6, typename T7, typename
T8, typename T9, typename T10, typename T11, typename T12, typename
T13> int Printf(const wxFormatString& f1, T1 a1, T2 a2
, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11
a11, T12 a12, T13 a13) { typedef const wxFormatString& TF1
; const wxFormatString *fmt = ((wxFormatStringArgumentFinder<
TF1>::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get()); } template
<typename T1, typename T2, typename T3, typename T4, typename
T5, typename T6, typename T7, typename T8, typename T9, typename
T10, typename T11, typename T12, typename T13, typename T14>
int Printf(const wxFormatString& f1, T1 a1, T2 a2, T3 a3
, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11,
T12 a12, T13 a13, T14 a14) { typedef const wxFormatString&
TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get()); } template<typename T1, typename
T2, typename T3, typename T4, typename T5, typename T6, typename
T7, typename T8, typename T9, typename T10, typename T11, typename
T12, typename T13, typename T14, typename T15> int Printf
(const wxFormatString& f1, T1 a1, T2 a2, T3 a3, T4 a4, T5
a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13
a13, T14 a14, T15 a15) { typedef const wxFormatString& TF1
; const wxFormatString *fmt = ((wxFormatStringArgumentFinder<
TF1>::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>
(a15, fmt, 15).get()); } template<typename T1, typename T2
, typename T3, typename T4, typename T5, typename T6, typename
T7, typename T8, typename T9, typename T10, typename T11, typename
T12, typename T13, typename T14, typename T15, typename T16>
int Printf(const wxFormatString& f1, T1 a1, T2 a2, T3 a3
, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11,
T12 a12, T13 a13, T14 a14, T15 a15, T16 a16) { typedef const
wxFormatString& TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>
(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt
, 16).get()); } template<typename T1, typename T2, typename
T3, typename T4, typename T5, typename T6, typename T7, typename
T8, typename T9, typename T10, typename T11, typename T12, typename
T13, typename T14, typename T15, typename T16, typename T17>
int Printf(const wxFormatString& f1, T1 a1, T2 a2, T3 a3
, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11,
T12 a12, T13 a13, T14 a14, T15 a15, T16 a16, T17 a17) { typedef
const wxFormatString& TF1; const wxFormatString *fmt = (
(wxFormatStringArgumentFinder<TF1>::find(f1))); return DoPrintfWchar
(f1, wxArgNormalizerWchar<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar
<T2>(a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(
a3, fmt, 3).get(), wxArgNormalizerWchar<T4>(a4, fmt, 4)
.get(), wxArgNormalizerWchar<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar
<T6>(a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(
a7, fmt, 7).get(), wxArgNormalizerWchar<T8>(a8, fmt, 8)
.get(), wxArgNormalizerWchar<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar
<T10>(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>
(a11, fmt, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt
, 12).get(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get
(), wxArgNormalizerWchar<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar
<T15>(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>
(a16, fmt, 16).get(), wxArgNormalizerWchar<T17>(a17, fmt
, 17).get()); } template<typename T1, typename T2, typename
T3, typename T4, typename T5, typename T6, typename T7, typename
T8, typename T9, typename T10, typename T11, typename T12, typename
T13, typename T14, typename T15, typename T16, typename T17,
typename T18> int Printf(const wxFormatString& f1, T1
a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10
a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16, T17
a17, T18 a18) { typedef const wxFormatString& TF1; const
wxFormatString *fmt = ((wxFormatStringArgumentFinder<TF1>
::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar<
T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt
, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(),
wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>
(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt
, 16).get(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get
(), wxArgNormalizerWchar<T18>(a18, fmt, 18).get()); } template
<typename T1, typename T2, typename T3, typename T4, typename
T5, typename T6, typename T7, typename T8, typename T9, typename
T10, typename T11, typename T12, typename T13, typename T14,
typename T15, typename T16, typename T17, typename T18, typename
T19> int Printf(const wxFormatString& f1, T1 a1, T2 a2
, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11
a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16, T17 a17, T18
a18, T19 a19) { typedef const wxFormatString& TF1; const
wxFormatString *fmt = ((wxFormatStringArgumentFinder<TF1>
::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar<
T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt
, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(),
wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>
(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt
, 16).get(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get
(), wxArgNormalizerWchar<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar
<T19>(a19, fmt, 19).get()); } template<typename T1, typename
T2, typename T3, typename T4, typename T5, typename T6, typename
T7, typename T8, typename T9, typename T10, typename T11, typename
T12, typename T13, typename T14, typename T15, typename T16,
typename T17, typename T18, typename T19, typename T20> int
Printf(const wxFormatString& f1, T1 a1, T2 a2, T3 a3, T4
a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12
a12, T13 a13, T14 a14, T15 a15, T16 a16, T17 a17, T18 a18, T19
a19, T20 a20) { typedef const wxFormatString& TF1; const
wxFormatString *fmt = ((wxFormatStringArgumentFinder<TF1>
::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar<
T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt
, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(),
wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>
(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt
, 16).get(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get
(), wxArgNormalizerWchar<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar
<T19>(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>
(a20, fmt, 20).get()); } template<typename T1, typename T2
, typename T3, typename T4, typename T5, typename T6, typename
T7, typename T8, typename T9, typename T10, typename T11, typename
T12, typename T13, typename T14, typename T15, typename T16,
typename T17, typename T18, typename T19, typename T20, typename
T21> int Printf(const wxFormatString& f1, T1 a1, T2 a2
, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11
a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16, T17 a17, T18
a18, T19 a19, T20 a20, T21 a21) { typedef const wxFormatString
& TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>
(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt
, 16).get(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get
(), wxArgNormalizerWchar<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar
<T19>(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>
(a20, fmt, 20).get(), wxArgNormalizerWchar<T21>(a21, fmt
, 21).get()); } template<typename T1, typename T2, typename
T3, typename T4, typename T5, typename T6, typename T7, typename
T8, typename T9, typename T10, typename T11, typename T12, typename
T13, typename T14, typename T15, typename T16, typename T17,
typename T18, typename T19, typename T20, typename T21, typename
T22> int Printf(const wxFormatString& f1, T1 a1, T2 a2
, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11
a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16, T17 a17, T18
a18, T19 a19, T20 a20, T21 a21, T22 a22) { typedef const wxFormatString
& TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>
(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt
, 16).get(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get
(), wxArgNormalizerWchar<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar
<T19>(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>
(a20, fmt, 20).get(), wxArgNormalizerWchar<T21>(a21, fmt
, 21).get(), wxArgNormalizerWchar<T22>(a22, fmt, 22).get
()); } template<typename T1, typename T2, typename T3, typename
T4, typename T5, typename T6, typename T7, typename T8, typename
T9, typename T10, typename T11, typename T12, typename T13, typename
T14, typename T15, typename T16, typename T17, typename T18,
typename T19, typename T20, typename T21, typename T22, typename
T23> int Printf(const wxFormatString& f1, T1 a1, T2 a2
, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11
a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16, T17 a17, T18
a18, T19 a19, T20 a20, T21 a21, T22 a22, T23 a23) { typedef const
wxFormatString& TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>
(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt
, 16).get(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get
(), wxArgNormalizerWchar<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar
<T19>(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>
(a20, fmt, 20).get(), wxArgNormalizerWchar<T21>(a21, fmt
, 21).get(), wxArgNormalizerWchar<T22>(a22, fmt, 22).get
(), wxArgNormalizerWchar<T23>(a23, fmt, 23).get()); } template
<typename T1, typename T2, typename T3, typename T4, typename
T5, typename T6, typename T7, typename T8, typename T9, typename
T10, typename T11, typename T12, typename T13, typename T14,
typename T15, typename T16, typename T17, typename T18, typename
T19, typename T20, typename T21, typename T22, typename T23,
typename T24> int Printf(const wxFormatString& f1, T1
a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10
a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16, T17
a17, T18 a18, T19 a19, T20 a20, T21 a21, T22 a22, T23 a23, T24
a24) { typedef const wxFormatString& TF1; const wxFormatString
*fmt = ((wxFormatStringArgumentFinder<TF1>::find(f1)))
; return DoPrintfWchar(f1, wxArgNormalizerWchar<T1>(a1,
fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt, 2).get
(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(), wxArgNormalizerWchar
<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar<T5>(
a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(a6, fmt, 6)
.get(), wxArgNormalizerWchar<T7>(a7, fmt, 7).get(), wxArgNormalizerWchar
<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar<T9>(
a9, fmt, 9).get(), wxArgNormalizerWchar<T10>(a10, fmt, 10
).get(), wxArgNormalizerWchar<T11>(a11, fmt, 11).get(),
wxArgNormalizerWchar<T12>(a12, fmt, 12).get(), wxArgNormalizerWchar
<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar<T14>
(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>(a15, fmt
, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt, 16).get
(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get(), wxArgNormalizerWchar
<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar<T19>
(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>(a20, fmt
, 20).get(), wxArgNormalizerWchar<T21>(a21, fmt, 21).get
(), wxArgNormalizerWchar<T22>(a22, fmt, 22).get(), wxArgNormalizerWchar
<T23>(a23, fmt, 23).get(), wxArgNormalizerWchar<T24>
(a24, fmt, 24).get()); } template<typename T1, typename T2
, typename T3, typename T4, typename T5, typename T6, typename
T7, typename T8, typename T9, typename T10, typename T11, typename
T12, typename T13, typename T14, typename T15, typename T16,
typename T17, typename T18, typename T19, typename T20, typename
T21, typename T22, typename T23, typename T24, typename T25>
int Printf(const wxFormatString& f1, T1 a1, T2 a2, T3 a3
, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11,
T12 a12, T13 a13, T14 a14, T15 a15, T16 a16, T17 a17, T18 a18
, T19 a19, T20 a20, T21 a21, T22 a22, T23 a23, T24 a24, T25 a25
) { typedef const wxFormatString& TF1; const wxFormatString
*fmt = ((wxFormatStringArgumentFinder<TF1>::find(f1)))
; return DoPrintfWchar(f1, wxArgNormalizerWchar<T1>(a1,
fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt, 2).get
(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(), wxArgNormalizerWchar
<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar<T5>(
a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(a6, fmt, 6)
.get(), wxArgNormalizerWchar<T7>(a7, fmt, 7).get(), wxArgNormalizerWchar
<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar<T9>(
a9, fmt, 9).get(), wxArgNormalizerWchar<T10>(a10, fmt, 10
).get(), wxArgNormalizerWchar<T11>(a11, fmt, 11).get(),
wxArgNormalizerWchar<T12>(a12, fmt, 12).get(), wxArgNormalizerWchar
<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar<T14>
(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>(a15, fmt
, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt, 16).get
(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get(), wxArgNormalizerWchar
<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar<T19>
(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>(a20, fmt
, 20).get(), wxArgNormalizerWchar<T21>(a21, fmt, 21).get
(), wxArgNormalizerWchar<T22>(a22, fmt, 22).get(), wxArgNormalizerWchar
<T23>(a23, fmt, 23).get(), wxArgNormalizerWchar<T24>
(a24, fmt, 24).get(), wxArgNormalizerWchar<T25>(a25, fmt
, 25).get()); } template<typename T1, typename T2, typename
T3, typename T4, typename T5, typename T6, typename T7, typename
T8, typename T9, typename T10, typename T11, typename T12, typename
T13, typename T14, typename T15, typename T16, typename T17,
typename T18, typename T19, typename T20, typename T21, typename
T22, typename T23, typename T24, typename T25, typename T26>
int Printf(const wxFormatString& f1, T1 a1, T2 a2, T3 a3
, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11,
T12 a12, T13 a13, T14 a14, T15 a15, T16 a16, T17 a17, T18 a18
, T19 a19, T20 a20, T21 a21, T22 a22, T23 a23, T24 a24, T25 a25
, T26 a26) { typedef const wxFormatString& TF1; const wxFormatString
*fmt = ((wxFormatStringArgumentFinder<TF1>::find(f1)))
; return DoPrintfWchar(f1, wxArgNormalizerWchar<T1>(a1,
fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt, 2).get
(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(), wxArgNormalizerWchar
<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar<T5>(
a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(a6, fmt, 6)
.get(), wxArgNormalizerWchar<T7>(a7, fmt, 7).get(), wxArgNormalizerWchar
<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar<T9>(
a9, fmt, 9).get(), wxArgNormalizerWchar<T10>(a10, fmt, 10
).get(), wxArgNormalizerWchar<T11>(a11, fmt, 11).get(),
wxArgNormalizerWchar<T12>(a12, fmt, 12).get(), wxArgNormalizerWchar
<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar<T14>
(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>(a15, fmt
, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt, 16).get
(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get(), wxArgNormalizerWchar
<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar<T19>
(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>(a20, fmt
, 20).get(), wxArgNormalizerWchar<T21>(a21, fmt, 21).get
(), wxArgNormalizerWchar<T22>(a22, fmt, 22).get(), wxArgNormalizerWchar
<T23>(a23, fmt, 23).get(), wxArgNormalizerWchar<T24>
(a24, fmt, 24).get(), wxArgNormalizerWchar<T25>(a25, fmt
, 25).get(), wxArgNormalizerWchar<T26>(a26, fmt, 26).get
()); } template<typename T1, typename T2, typename T3, typename
T4, typename T5, typename T6, typename T7, typename T8, typename
T9, typename T10, typename T11, typename T12, typename T13, typename
T14, typename T15, typename T16, typename T17, typename T18,
typename T19, typename T20, typename T21, typename T22, typename
T23, typename T24, typename T25, typename T26, typename T27>
int Printf(const wxFormatString& f1, T1 a1, T2 a2, T3 a3
, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11,
T12 a12, T13 a13, T14 a14, T15 a15, T16 a16, T17 a17, T18 a18
, T19 a19, T20 a20, T21 a21, T22 a22, T23 a23, T24 a24, T25 a25
, T26 a26, T27 a27) { typedef const wxFormatString& TF1; const
wxFormatString *fmt = ((wxFormatStringArgumentFinder<TF1>
::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar<
T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt
, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(),
wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>
(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt
, 16).get(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get
(), wxArgNormalizerWchar<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar
<T19>(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>
(a20, fmt, 20).get(), wxArgNormalizerWchar<T21>(a21, fmt
, 21).get(), wxArgNormalizerWchar<T22>(a22, fmt, 22).get
(), wxArgNormalizerWchar<T23>(a23, fmt, 23).get(), wxArgNormalizerWchar
<T24>(a24, fmt, 24).get(), wxArgNormalizerWchar<T25>
(a25, fmt, 25).get(), wxArgNormalizerWchar<T26>(a26, fmt
, 26).get(), wxArgNormalizerWchar<T27>(a27, fmt, 27).get
()); } template<typename T1, typename T2, typename T3, typename
T4, typename T5, typename T6, typename T7, typename T8, typename
T9, typename T10, typename T11, typename T12, typename T13, typename
T14, typename T15, typename T16, typename T17, typename T18,
typename T19, typename T20, typename T21, typename T22, typename
T23, typename T24, typename T25, typename T26, typename T27,
typename T28> int Printf(const wxFormatString& f1, T1
a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10
a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16, T17
a17, T18 a18, T19 a19, T20 a20, T21 a21, T22 a22, T23 a23, T24
a24, T25 a25, T26 a26, T27 a27, T28 a28) { typedef const wxFormatString
& TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>
(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt
, 16).get(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get
(), wxArgNormalizerWchar<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar
<T19>(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>
(a20, fmt, 20).get(), wxArgNormalizerWchar<T21>(a21, fmt
, 21).get(), wxArgNormalizerWchar<T22>(a22, fmt, 22).get
(), wxArgNormalizerWchar<T23>(a23, fmt, 23).get(), wxArgNormalizerWchar
<T24>(a24, fmt, 24).get(), wxArgNormalizerWchar<T25>
(a25, fmt, 25).get(), wxArgNormalizerWchar<T26>(a26, fmt
, 26).get(), wxArgNormalizerWchar<T27>(a27, fmt, 27).get
(), wxArgNormalizerWchar<T28>(a28, fmt, 28).get()); } template
<typename T1, typename T2, typename T3, typename T4, typename
T5, typename T6, typename T7, typename T8, typename T9, typename
T10, typename T11, typename T12, typename T13, typename T14,
typename T15, typename T16, typename T17, typename T18, typename
T19, typename T20, typename T21, typename T22, typename T23,
typename T24, typename T25, typename T26, typename T27, typename
T28, typename T29> int Printf(const wxFormatString& f1
, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9
, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16
, T17 a17, T18 a18, T19 a19, T20 a20, T21 a21, T22 a22, T23 a23
, T24 a24, T25 a25, T26 a26, T27 a27, T28 a28, T29 a29) { typedef
const wxFormatString& TF1; const wxFormatString *fmt = (
(wxFormatStringArgumentFinder<TF1>::find(f1))); return DoPrintfWchar
(f1, wxArgNormalizerWchar<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar
<T2>(a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(
a3, fmt, 3).get(), wxArgNormalizerWchar<T4>(a4, fmt, 4)
.get(), wxArgNormalizerWchar<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar
<T6>(a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(
a7, fmt, 7).get(), wxArgNormalizerWchar<T8>(a8, fmt, 8)
.get(), wxArgNormalizerWchar<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar
<T10>(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>
(a11, fmt, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt
, 12).get(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get
(), wxArgNormalizerWchar<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar
<T15>(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>
(a16, fmt, 16).get(), wxArgNormalizerWchar<T17>(a17, fmt
, 17).get(), wxArgNormalizerWchar<T18>(a18, fmt, 18).get
(), wxArgNormalizerWchar<T19>(a19, fmt, 19).get(), wxArgNormalizerWchar
<T20>(a20, fmt, 20).get(), wxArgNormalizerWchar<T21>
(a21, fmt, 21).get(), wxArgNormalizerWchar<T22>(a22, fmt
, 22).get(), wxArgNormalizerWchar<T23>(a23, fmt, 23).get
(), wxArgNormalizerWchar<T24>(a24, fmt, 24).get(), wxArgNormalizerWchar
<T25>(a25, fmt, 25).get(), wxArgNormalizerWchar<T26>
(a26, fmt, 26).get(), wxArgNormalizerWchar<T27>(a27, fmt
, 27).get(), wxArgNormalizerWchar<T28>(a28, fmt, 28).get
(), wxArgNormalizerWchar<T29>(a29, fmt, 29).get()); } template
<typename T1, typename T2, typename T3, typename T4, typename
T5, typename T6, typename T7, typename T8, typename T9, typename
T10, typename T11, typename T12, typename T13, typename T14,
typename T15, typename T16, typename T17, typename T18, typename
T19, typename T20, typename T21, typename T22, typename T23,
typename T24, typename T25, typename T26, typename T27, typename
T28, typename T29, typename T30> int Printf(const wxFormatString
& f1, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8
a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15
, T16 a16, T17 a17, T18 a18, T19 a19, T20 a20, T21 a21, T22 a22
, T23 a23, T24 a24, T25 a25, T26 a26, T27 a27, T28 a28, T29 a29
, T30 a30) { typedef const wxFormatString& TF1; const wxFormatString
*fmt = ((wxFormatStringArgumentFinder<TF1>::find(f1)))
; return DoPrintfWchar(f1, wxArgNormalizerWchar<T1>(a1,
fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt, 2).get
(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(), wxArgNormalizerWchar
<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar<T5>(
a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(a6, fmt, 6)
.get(), wxArgNormalizerWchar<T7>(a7, fmt, 7).get(), wxArgNormalizerWchar
<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar<T9>(
a9, fmt, 9).get(), wxArgNormalizerWchar<T10>(a10, fmt, 10
).get(), wxArgNormalizerWchar<T11>(a11, fmt, 11).get(),
wxArgNormalizerWchar<T12>(a12, fmt, 12).get(), wxArgNormalizerWchar
<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar<T14>
(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>(a15, fmt
, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt, 16).get
(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get(), wxArgNormalizerWchar
<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar<T19>
(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>(a20, fmt
, 20).get(), wxArgNormalizerWchar<T21>(a21, fmt, 21).get
(), wxArgNormalizerWchar<T22>(a22, fmt, 22).get(), wxArgNormalizerWchar
<T23>(a23, fmt, 23).get(), wxArgNormalizerWchar<T24>
(a24, fmt, 24).get(), wxArgNormalizerWchar<T25>(a25, fmt
, 25).get(), wxArgNormalizerWchar<T26>(a26, fmt, 26).get
(), wxArgNormalizerWchar<T27>(a27, fmt, 27).get(), wxArgNormalizerWchar
<T28>(a28, fmt, 28).get(), wxArgNormalizerWchar<T29>
(a29, fmt, 29).get(), wxArgNormalizerWchar<T30>(a30, fmt
, 30).get()); }
2423 // as vprintf(), returns the number of characters written or < 0 on error
2424 int PrintfV(const wxString& format, va_list argptr);
2425
2426 // returns the string containing the result of Printf() to it
2427 // static wxString Format(const wxString& format, ...) WX_ATTRIBUTE_PRINTF_1;
2428 WX_DEFINE_VARARG_FUNC(static wxString, Format, 1, (const wxFormatString&),inline static wxString Format(const wxFormatString& f1) {
return DoFormatWchar(f1); } template<typename T1> static
wxString Format(const wxFormatString& f1, T1 a1) { typedef
const wxFormatString& TF1; const wxFormatString *fmt = (
(wxFormatStringArgumentFinder<TF1>::find(f1))); return DoFormatWchar
(f1, wxArgNormalizerWchar<T1>(a1, fmt, 1).get()); } template
<typename T1, typename T2> static wxString Format(const
wxFormatString& f1, T1 a1, T2 a2) { typedef const wxFormatString
& TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoFormatWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get()); } template<typename T1, typename T2, typename
T3> static wxString Format(const wxFormatString& f1, T1
a1, T2 a2, T3 a3) { typedef const wxFormatString& TF1; const
wxFormatString *fmt = ((wxFormatStringArgumentFinder<TF1>
::find(f1))); return DoFormatWchar(f1, wxArgNormalizerWchar<
T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt
, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get())
; } template<typename T1, typename T2, typename T3, typename
T4> static wxString Format(const wxFormatString& f1, T1
a1, T2 a2, T3 a3, T4 a4) { typedef const wxFormatString&
TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoFormatWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get()); } template
<typename T1, typename T2, typename T3, typename T4, typename
T5> static wxString Format(const wxFormatString& f1, T1
a1, T2 a2, T3 a3, T4 a4, T5 a5) { typedef const wxFormatString
& TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoFormatWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get()); } template<typename T1, typename
T2, typename T3, typename T4, typename T5, typename T6> static
wxString Format(const wxFormatString& f1, T1 a1, T2 a2, T3
a3, T4 a4, T5 a5, T6 a6) { typedef const wxFormatString&
TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoFormatWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get()); } template<typename T1, typename T2, typename
T3, typename T4, typename T5, typename T6, typename T7> static
wxString Format(const wxFormatString& f1, T1 a1, T2 a2, T3
a3, T4 a4, T5 a5, T6 a6, T7 a7) { typedef const wxFormatString
& TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoFormatWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get()); } template<typename T1, typename T2, typename T3,
typename T4, typename T5, typename T6, typename T7, typename
T8> static wxString Format(const wxFormatString& f1, T1
a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8) { typedef
const wxFormatString& TF1; const wxFormatString *fmt = (
(wxFormatStringArgumentFinder<TF1>::find(f1))); return DoFormatWchar
(f1, wxArgNormalizerWchar<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar
<T2>(a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(
a3, fmt, 3).get(), wxArgNormalizerWchar<T4>(a4, fmt, 4)
.get(), wxArgNormalizerWchar<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar
<T6>(a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(
a7, fmt, 7).get(), wxArgNormalizerWchar<T8>(a8, fmt, 8)
.get()); } template<typename T1, typename T2, typename T3,
typename T4, typename T5, typename T6, typename T7, typename
T8, typename T9> static wxString Format(const wxFormatString
& f1, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8
a8, T9 a9) { typedef const wxFormatString& TF1; const wxFormatString
*fmt = ((wxFormatStringArgumentFinder<TF1>::find(f1)))
; return DoFormatWchar(f1, wxArgNormalizerWchar<T1>(a1,
fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt, 2).get
(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(), wxArgNormalizerWchar
<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar<T5>(
a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(a6, fmt, 6)
.get(), wxArgNormalizerWchar<T7>(a7, fmt, 7).get(), wxArgNormalizerWchar
<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar<T9>(
a9, fmt, 9).get()); } template<typename T1, typename T2, typename
T3, typename T4, typename T5, typename T6, typename T7, typename
T8, typename T9, typename T10> static wxString Format(const
wxFormatString& f1, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6
a6, T7 a7, T8 a8, T9 a9, T10 a10) { typedef const wxFormatString
& TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoFormatWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get()); } template<typename T1, typename T2
, typename T3, typename T4, typename T5, typename T6, typename
T7, typename T8, typename T9, typename T10, typename T11>
static wxString Format(const wxFormatString& f1, T1 a1, T2
a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10
, T11 a11) { typedef const wxFormatString& TF1; const wxFormatString
*fmt = ((wxFormatStringArgumentFinder<TF1>::find(f1)))
; return DoFormatWchar(f1, wxArgNormalizerWchar<T1>(a1,
fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt, 2).get
(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(), wxArgNormalizerWchar
<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar<T5>(
a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(a6, fmt, 6)
.get(), wxArgNormalizerWchar<T7>(a7, fmt, 7).get(), wxArgNormalizerWchar
<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar<T9>(
a9, fmt, 9).get(), wxArgNormalizerWchar<T10>(a10, fmt, 10
).get(), wxArgNormalizerWchar<T11>(a11, fmt, 11).get())
; } template<typename T1, typename T2, typename T3, typename
T4, typename T5, typename T6, typename T7, typename T8, typename
T9, typename T10, typename T11, typename T12> static wxString
Format(const wxFormatString& f1, T1 a1, T2 a2, T3 a3, T4
a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12
a12) { typedef const wxFormatString& TF1; const wxFormatString
*fmt = ((wxFormatStringArgumentFinder<TF1>::find(f1)))
; return DoFormatWchar(f1, wxArgNormalizerWchar<T1>(a1,
fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt, 2).get
(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(), wxArgNormalizerWchar
<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar<T5>(
a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(a6, fmt, 6)
.get(), wxArgNormalizerWchar<T7>(a7, fmt, 7).get(), wxArgNormalizerWchar
<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar<T9>(
a9, fmt, 9).get(), wxArgNormalizerWchar<T10>(a10, fmt, 10
).get(), wxArgNormalizerWchar<T11>(a11, fmt, 11).get(),
wxArgNormalizerWchar<T12>(a12, fmt, 12).get()); } template
<typename T1, typename T2, typename T3, typename T4, typename
T5, typename T6, typename T7, typename T8, typename T9, typename
T10, typename T11, typename T12, typename T13> static wxString
Format(const wxFormatString& f1, T1 a1, T2 a2, T3 a3, T4
a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12
a12, T13 a13) { typedef const wxFormatString& TF1; const
wxFormatString *fmt = ((wxFormatStringArgumentFinder<TF1>
::find(f1))); return DoFormatWchar(f1, wxArgNormalizerWchar<
T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt
, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(),
wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get()); } template
<typename T1, typename T2, typename T3, typename T4, typename
T5, typename T6, typename T7, typename T8, typename T9, typename
T10, typename T11, typename T12, typename T13, typename T14>
static wxString Format(const wxFormatString& f1, T1 a1, T2
a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10
, T11 a11, T12 a12, T13 a13, T14 a14) { typedef const wxFormatString
& TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoFormatWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get()); } template<typename T1, typename
T2, typename T3, typename T4, typename T5, typename T6, typename
T7, typename T8, typename T9, typename T10, typename T11, typename
T12, typename T13, typename T14, typename T15> static wxString
Format(const wxFormatString& f1, T1 a1, T2 a2, T3 a3, T4
a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12
a12, T13 a13, T14 a14, T15 a15) { typedef const wxFormatString
& TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoFormatWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>
(a15, fmt, 15).get()); } template<typename T1, typename T2
, typename T3, typename T4, typename T5, typename T6, typename
T7, typename T8, typename T9, typename T10, typename T11, typename
T12, typename T13, typename T14, typename T15, typename T16>
static wxString Format(const wxFormatString& f1, T1 a1, T2
a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10
, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16) { typedef
const wxFormatString& TF1; const wxFormatString *fmt = (
(wxFormatStringArgumentFinder<TF1>::find(f1))); return DoFormatWchar
(f1, wxArgNormalizerWchar<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar
<T2>(a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(
a3, fmt, 3).get(), wxArgNormalizerWchar<T4>(a4, fmt, 4)
.get(), wxArgNormalizerWchar<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar
<T6>(a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(
a7, fmt, 7).get(), wxArgNormalizerWchar<T8>(a8, fmt, 8)
.get(), wxArgNormalizerWchar<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar
<T10>(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>
(a11, fmt, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt
, 12).get(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get
(), wxArgNormalizerWchar<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar
<T15>(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>
(a16, fmt, 16).get()); } template<typename T1, typename T2
, typename T3, typename T4, typename T5, typename T6, typename
T7, typename T8, typename T9, typename T10, typename T11, typename
T12, typename T13, typename T14, typename T15, typename T16,
typename T17> static wxString Format(const wxFormatString
& f1, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8
a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15
, T16 a16, T17 a17) { typedef const wxFormatString& TF1; const
wxFormatString *fmt = ((wxFormatStringArgumentFinder<TF1>
::find(f1))); return DoFormatWchar(f1, wxArgNormalizerWchar<
T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt
, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(),
wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>
(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt
, 16).get(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get
()); } template<typename T1, typename T2, typename T3, typename
T4, typename T5, typename T6, typename T7, typename T8, typename
T9, typename T10, typename T11, typename T12, typename T13, typename
T14, typename T15, typename T16, typename T17, typename T18>
static wxString Format(const wxFormatString& f1, T1 a1, T2
a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10
, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16, T17 a17
, T18 a18) { typedef const wxFormatString& TF1; const wxFormatString
*fmt = ((wxFormatStringArgumentFinder<TF1>::find(f1)))
; return DoFormatWchar(f1, wxArgNormalizerWchar<T1>(a1,
fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt, 2).get
(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(), wxArgNormalizerWchar
<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar<T5>(
a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(a6, fmt, 6)
.get(), wxArgNormalizerWchar<T7>(a7, fmt, 7).get(), wxArgNormalizerWchar
<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar<T9>(
a9, fmt, 9).get(), wxArgNormalizerWchar<T10>(a10, fmt, 10
).get(), wxArgNormalizerWchar<T11>(a11, fmt, 11).get(),
wxArgNormalizerWchar<T12>(a12, fmt, 12).get(), wxArgNormalizerWchar
<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar<T14>
(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>(a15, fmt
, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt, 16).get
(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get(), wxArgNormalizerWchar
<T18>(a18, fmt, 18).get()); } template<typename T1, typename
T2, typename T3, typename T4, typename T5, typename T6, typename
T7, typename T8, typename T9, typename T10, typename T11, typename
T12, typename T13, typename T14, typename T15, typename T16,
typename T17, typename T18, typename T19> static wxString
Format(const wxFormatString& f1, T1 a1, T2 a2, T3 a3, T4
a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12
a12, T13 a13, T14 a14, T15 a15, T16 a16, T17 a17, T18 a18, T19
a19) { typedef const wxFormatString& TF1; const wxFormatString
*fmt = ((wxFormatStringArgumentFinder<TF1>::find(f1)))
; return DoFormatWchar(f1, wxArgNormalizerWchar<T1>(a1,
fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt, 2).get
(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(), wxArgNormalizerWchar
<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar<T5>(
a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(a6, fmt, 6)
.get(), wxArgNormalizerWchar<T7>(a7, fmt, 7).get(), wxArgNormalizerWchar
<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar<T9>(
a9, fmt, 9).get(), wxArgNormalizerWchar<T10>(a10, fmt, 10
).get(), wxArgNormalizerWchar<T11>(a11, fmt, 11).get(),
wxArgNormalizerWchar<T12>(a12, fmt, 12).get(), wxArgNormalizerWchar
<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar<T14>
(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>(a15, fmt
, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt, 16).get
(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get(), wxArgNormalizerWchar
<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar<T19>
(a19, fmt, 19).get()); } template<typename T1, typename T2
, typename T3, typename T4, typename T5, typename T6, typename
T7, typename T8, typename T9, typename T10, typename T11, typename
T12, typename T13, typename T14, typename T15, typename T16,
typename T17, typename T18, typename T19, typename T20> static
wxString Format(const wxFormatString& f1, T1 a1, T2 a2, T3
a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11
, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16, T17 a17, T18 a18
, T19 a19, T20 a20) { typedef const wxFormatString& TF1; const
wxFormatString *fmt = ((wxFormatStringArgumentFinder<TF1>
::find(f1))); return DoFormatWchar(f1, wxArgNormalizerWchar<
T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt
, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(),
wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>
(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt
, 16).get(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get
(), wxArgNormalizerWchar<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar
<T19>(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>
(a20, fmt, 20).get()); } template<typename T1, typename T2
, typename T3, typename T4, typename T5, typename T6, typename
T7, typename T8, typename T9, typename T10, typename T11, typename
T12, typename T13, typename T14, typename T15, typename T16,
typename T17, typename T18, typename T19, typename T20, typename
T21> static wxString Format(const wxFormatString& f1,
T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9
, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16
, T17 a17, T18 a18, T19 a19, T20 a20, T21 a21) { typedef const
wxFormatString& TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoFormatWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>
(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt
, 16).get(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get
(), wxArgNormalizerWchar<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar
<T19>(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>
(a20, fmt, 20).get(), wxArgNormalizerWchar<T21>(a21, fmt
, 21).get()); } template<typename T1, typename T2, typename
T3, typename T4, typename T5, typename T6, typename T7, typename
T8, typename T9, typename T10, typename T11, typename T12, typename
T13, typename T14, typename T15, typename T16, typename T17,
typename T18, typename T19, typename T20, typename T21, typename
T22> static wxString Format(const wxFormatString& f1,
T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9
, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16
, T17 a17, T18 a18, T19 a19, T20 a20, T21 a21, T22 a22) { typedef
const wxFormatString& TF1; const wxFormatString *fmt = (
(wxFormatStringArgumentFinder<TF1>::find(f1))); return DoFormatWchar
(f1, wxArgNormalizerWchar<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar
<T2>(a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(
a3, fmt, 3).get(), wxArgNormalizerWchar<T4>(a4, fmt, 4)
.get(), wxArgNormalizerWchar<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar
<T6>(a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(
a7, fmt, 7).get(), wxArgNormalizerWchar<T8>(a8, fmt, 8)
.get(), wxArgNormalizerWchar<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar
<T10>(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>
(a11, fmt, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt
, 12).get(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get
(), wxArgNormalizerWchar<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar
<T15>(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>
(a16, fmt, 16).get(), wxArgNormalizerWchar<T17>(a17, fmt
, 17).get(), wxArgNormalizerWchar<T18>(a18, fmt, 18).get
(), wxArgNormalizerWchar<T19>(a19, fmt, 19).get(), wxArgNormalizerWchar
<T20>(a20, fmt, 20).get(), wxArgNormalizerWchar<T21>
(a21, fmt, 21).get(), wxArgNormalizerWchar<T22>(a22, fmt
, 22).get()); } template<typename T1, typename T2, typename
T3, typename T4, typename T5, typename T6, typename T7, typename
T8, typename T9, typename T10, typename T11, typename T12, typename
T13, typename T14, typename T15, typename T16, typename T17,
typename T18, typename T19, typename T20, typename T21, typename
T22, typename T23> static wxString Format(const wxFormatString
& f1, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8
a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15
, T16 a16, T17 a17, T18 a18, T19 a19, T20 a20, T21 a21, T22 a22
, T23 a23) { typedef const wxFormatString& TF1; const wxFormatString
*fmt = ((wxFormatStringArgumentFinder<TF1>::find(f1)))
; return DoFormatWchar(f1, wxArgNormalizerWchar<T1>(a1,
fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt, 2).get
(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(), wxArgNormalizerWchar
<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar<T5>(
a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(a6, fmt, 6)
.get(), wxArgNormalizerWchar<T7>(a7, fmt, 7).get(), wxArgNormalizerWchar
<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar<T9>(
a9, fmt, 9).get(), wxArgNormalizerWchar<T10>(a10, fmt, 10
).get(), wxArgNormalizerWchar<T11>(a11, fmt, 11).get(),
wxArgNormalizerWchar<T12>(a12, fmt, 12).get(), wxArgNormalizerWchar
<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar<T14>
(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>(a15, fmt
, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt, 16).get
(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get(), wxArgNormalizerWchar
<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar<T19>
(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>(a20, fmt
, 20).get(), wxArgNormalizerWchar<T21>(a21, fmt, 21).get
(), wxArgNormalizerWchar<T22>(a22, fmt, 22).get(), wxArgNormalizerWchar
<T23>(a23, fmt, 23).get()); } template<typename T1, typename
T2, typename T3, typename T4, typename T5, typename T6, typename
T7, typename T8, typename T9, typename T10, typename T11, typename
T12, typename T13, typename T14, typename T15, typename T16,
typename T17, typename T18, typename T19, typename T20, typename
T21, typename T22, typename T23, typename T24> static wxString
Format(const wxFormatString& f1, T1 a1, T2 a2, T3 a3, T4
a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12
a12, T13 a13, T14 a14, T15 a15, T16 a16, T17 a17, T18 a18, T19
a19, T20 a20, T21 a21, T22 a22, T23 a23, T24 a24) { typedef const
wxFormatString& TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoFormatWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>
(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt
, 16).get(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get
(), wxArgNormalizerWchar<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar
<T19>(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>
(a20, fmt, 20).get(), wxArgNormalizerWchar<T21>(a21, fmt
, 21).get(), wxArgNormalizerWchar<T22>(a22, fmt, 22).get
(), wxArgNormalizerWchar<T23>(a23, fmt, 23).get(), wxArgNormalizerWchar
<T24>(a24, fmt, 24).get()); } template<typename T1, typename
T2, typename T3, typename T4, typename T5, typename T6, typename
T7, typename T8, typename T9, typename T10, typename T11, typename
T12, typename T13, typename T14, typename T15, typename T16,
typename T17, typename T18, typename T19, typename T20, typename
T21, typename T22, typename T23, typename T24, typename T25>
static wxString Format(const wxFormatString& f1, T1 a1, T2
a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10
, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16, T17 a17
, T18 a18, T19 a19, T20 a20, T21 a21, T22 a22, T23 a23, T24 a24
, T25 a25) { typedef const wxFormatString& TF1; const wxFormatString
*fmt = ((wxFormatStringArgumentFinder<TF1>::find(f1)))
; return DoFormatWchar(f1, wxArgNormalizerWchar<T1>(a1,
fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt, 2).get
(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(), wxArgNormalizerWchar
<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar<T5>(
a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(a6, fmt, 6)
.get(), wxArgNormalizerWchar<T7>(a7, fmt, 7).get(), wxArgNormalizerWchar
<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar<T9>(
a9, fmt, 9).get(), wxArgNormalizerWchar<T10>(a10, fmt, 10
).get(), wxArgNormalizerWchar<T11>(a11, fmt, 11).get(),
wxArgNormalizerWchar<T12>(a12, fmt, 12).get(), wxArgNormalizerWchar
<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar<T14>
(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>(a15, fmt
, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt, 16).get
(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get(), wxArgNormalizerWchar
<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar<T19>
(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>(a20, fmt
, 20).get(), wxArgNormalizerWchar<T21>(a21, fmt, 21).get
(), wxArgNormalizerWchar<T22>(a22, fmt, 22).get(), wxArgNormalizerWchar
<T23>(a23, fmt, 23).get(), wxArgNormalizerWchar<T24>
(a24, fmt, 24).get(), wxArgNormalizerWchar<T25>(a25, fmt
, 25).get()); } template<typename T1, typename T2, typename
T3, typename T4, typename T5, typename T6, typename T7, typename
T8, typename T9, typename T10, typename T11, typename T12, typename
T13, typename T14, typename T15, typename T16, typename T17,
typename T18, typename T19, typename T20, typename T21, typename
T22, typename T23, typename T24, typename T25, typename T26>
static wxString Format(const wxFormatString& f1, T1 a1, T2
a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10
, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16, T17 a17
, T18 a18, T19 a19, T20 a20, T21 a21, T22 a22, T23 a23, T24 a24
, T25 a25, T26 a26) { typedef const wxFormatString& TF1; const
wxFormatString *fmt = ((wxFormatStringArgumentFinder<TF1>
::find(f1))); return DoFormatWchar(f1, wxArgNormalizerWchar<
T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt
, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(),
wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>
(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt
, 16).get(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get
(), wxArgNormalizerWchar<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar
<T19>(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>
(a20, fmt, 20).get(), wxArgNormalizerWchar<T21>(a21, fmt
, 21).get(), wxArgNormalizerWchar<T22>(a22, fmt, 22).get
(), wxArgNormalizerWchar<T23>(a23, fmt, 23).get(), wxArgNormalizerWchar
<T24>(a24, fmt, 24).get(), wxArgNormalizerWchar<T25>
(a25, fmt, 25).get(), wxArgNormalizerWchar<T26>(a26, fmt
, 26).get()); } template<typename T1, typename T2, typename
T3, typename T4, typename T5, typename T6, typename T7, typename
T8, typename T9, typename T10, typename T11, typename T12, typename
T13, typename T14, typename T15, typename T16, typename T17,
typename T18, typename T19, typename T20, typename T21, typename
T22, typename T23, typename T24, typename T25, typename T26,
typename T27> static wxString Format(const wxFormatString
& f1, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8
a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15
, T16 a16, T17 a17, T18 a18, T19 a19, T20 a20, T21 a21, T22 a22
, T23 a23, T24 a24, T25 a25, T26 a26, T27 a27) { typedef const
wxFormatString& TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoFormatWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>
(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt
, 16).get(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get
(), wxArgNormalizerWchar<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar
<T19>(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>
(a20, fmt, 20).get(), wxArgNormalizerWchar<T21>(a21, fmt
, 21).get(), wxArgNormalizerWchar<T22>(a22, fmt, 22).get
(), wxArgNormalizerWchar<T23>(a23, fmt, 23).get(), wxArgNormalizerWchar
<T24>(a24, fmt, 24).get(), wxArgNormalizerWchar<T25>
(a25, fmt, 25).get(), wxArgNormalizerWchar<T26>(a26, fmt
, 26).get(), wxArgNormalizerWchar<T27>(a27, fmt, 27).get
()); } template<typename T1, typename T2, typename T3, typename
T4, typename T5, typename T6, typename T7, typename T8, typename
T9, typename T10, typename T11, typename T12, typename T13, typename
T14, typename T15, typename T16, typename T17, typename T18,
typename T19, typename T20, typename T21, typename T22, typename
T23, typename T24, typename T25, typename T26, typename T27,
typename T28> static wxString Format(const wxFormatString
& f1, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8
a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15
, T16 a16, T17 a17, T18 a18, T19 a19, T20 a20, T21 a21, T22 a22
, T23 a23, T24 a24, T25 a25, T26 a26, T27 a27, T28 a28) { typedef
const wxFormatString& TF1; const wxFormatString *fmt = (
(wxFormatStringArgumentFinder<TF1>::find(f1))); return DoFormatWchar
(f1, wxArgNormalizerWchar<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar
<T2>(a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(
a3, fmt, 3).get(), wxArgNormalizerWchar<T4>(a4, fmt, 4)
.get(), wxArgNormalizerWchar<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar
<T6>(a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(
a7, fmt, 7).get(), wxArgNormalizerWchar<T8>(a8, fmt, 8)
.get(), wxArgNormalizerWchar<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar
<T10>(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>
(a11, fmt, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt
, 12).get(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get
(), wxArgNormalizerWchar<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar
<T15>(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>
(a16, fmt, 16).get(), wxArgNormalizerWchar<T17>(a17, fmt
, 17).get(), wxArgNormalizerWchar<T18>(a18, fmt, 18).get
(), wxArgNormalizerWchar<T19>(a19, fmt, 19).get(), wxArgNormalizerWchar
<T20>(a20, fmt, 20).get(), wxArgNormalizerWchar<T21>
(a21, fmt, 21).get(), wxArgNormalizerWchar<T22>(a22, fmt
, 22).get(), wxArgNormalizerWchar<T23>(a23, fmt, 23).get
(), wxArgNormalizerWchar<T24>(a24, fmt, 24).get(), wxArgNormalizerWchar
<T25>(a25, fmt, 25).get(), wxArgNormalizerWchar<T26>
(a26, fmt, 26).get(), wxArgNormalizerWchar<T27>(a27, fmt
, 27).get(), wxArgNormalizerWchar<T28>(a28, fmt, 28).get
()); } template<typename T1, typename T2, typename T3, typename
T4, typename T5, typename T6, typename T7, typename T8, typename
T9, typename T10, typename T11, typename T12, typename T13, typename
T14, typename T15, typename T16, typename T17, typename T18,
typename T19, typename T20, typename T21, typename T22, typename
T23, typename T24, typename T25, typename T26, typename T27,
typename T28, typename T29> static wxString Format(const wxFormatString
& f1, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8
a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15
, T16 a16, T17 a17, T18 a18, T19 a19, T20 a20, T21 a21, T22 a22
, T23 a23, T24 a24, T25 a25, T26 a26, T27 a27, T28 a28, T29 a29
) { typedef const wxFormatString& TF1; const wxFormatString
*fmt = ((wxFormatStringArgumentFinder<TF1>::find(f1)))
; return DoFormatWchar(f1, wxArgNormalizerWchar<T1>(a1,
fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt, 2).get
(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(), wxArgNormalizerWchar
<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar<T5>(
a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(a6, fmt, 6)
.get(), wxArgNormalizerWchar<T7>(a7, fmt, 7).get(), wxArgNormalizerWchar
<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar<T9>(
a9, fmt, 9).get(), wxArgNormalizerWchar<T10>(a10, fmt, 10
).get(), wxArgNormalizerWchar<T11>(a11, fmt, 11).get(),
wxArgNormalizerWchar<T12>(a12, fmt, 12).get(), wxArgNormalizerWchar
<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar<T14>
(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>(a15, fmt
, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt, 16).get
(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get(), wxArgNormalizerWchar
<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar<T19>
(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>(a20, fmt
, 20).get(), wxArgNormalizerWchar<T21>(a21, fmt, 21).get
(), wxArgNormalizerWchar<T22>(a22, fmt, 22).get(), wxArgNormalizerWchar
<T23>(a23, fmt, 23).get(), wxArgNormalizerWchar<T24>
(a24, fmt, 24).get(), wxArgNormalizerWchar<T25>(a25, fmt
, 25).get(), wxArgNormalizerWchar<T26>(a26, fmt, 26).get
(), wxArgNormalizerWchar<T27>(a27, fmt, 27).get(), wxArgNormalizerWchar
<T28>(a28, fmt, 28).get(), wxArgNormalizerWchar<T29>
(a29, fmt, 29).get()); } template<typename T1, typename T2
, typename T3, typename T4, typename T5, typename T6, typename
T7, typename T8, typename T9, typename T10, typename T11, typename
T12, typename T13, typename T14, typename T15, typename T16,
typename T17, typename T18, typename T19, typename T20, typename
T21, typename T22, typename T23, typename T24, typename T25,
typename T26, typename T27, typename T28, typename T29, typename
T30> static wxString Format(const wxFormatString& f1,
T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9
, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16
, T17 a17, T18 a18, T19 a19, T20 a20, T21 a21, T22 a22, T23 a23
, T24 a24, T25 a25, T26 a26, T27 a27, T28 a28, T29 a29, T30 a30
) { typedef const wxFormatString& TF1; const wxFormatString
*fmt = ((wxFormatStringArgumentFinder<TF1>::find(f1)))
; return DoFormatWchar(f1, wxArgNormalizerWchar<T1>(a1,
fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt, 2).get
(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(), wxArgNormalizerWchar
<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar<T5>(
a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(a6, fmt, 6)
.get(), wxArgNormalizerWchar<T7>(a7, fmt, 7).get(), wxArgNormalizerWchar
<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar<T9>(
a9, fmt, 9).get(), wxArgNormalizerWchar<T10>(a10, fmt, 10
).get(), wxArgNormalizerWchar<T11>(a11, fmt, 11).get(),
wxArgNormalizerWchar<T12>(a12, fmt, 12).get(), wxArgNormalizerWchar
<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar<T14>
(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>(a15, fmt
, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt, 16).get
(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get(), wxArgNormalizerWchar
<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar<T19>
(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>(a20, fmt
, 20).get(), wxArgNormalizerWchar<T21>(a21, fmt, 21).get
(), wxArgNormalizerWchar<T22>(a22, fmt, 22).get(), wxArgNormalizerWchar
<T23>(a23, fmt, 23).get(), wxArgNormalizerWchar<T24>
(a24, fmt, 24).get(), wxArgNormalizerWchar<T25>(a25, fmt
, 25).get(), wxArgNormalizerWchar<T26>(a26, fmt, 26).get
(), wxArgNormalizerWchar<T27>(a27, fmt, 27).get(), wxArgNormalizerWchar
<T28>(a28, fmt, 28).get(), wxArgNormalizerWchar<T29>
(a29, fmt, 29).get(), wxArgNormalizerWchar<T30>(a30, fmt
, 30).get()); }
2429 DoFormatWchar, DoFormatUtf8)inline static wxString Format(const wxFormatString& f1) {
return DoFormatWchar(f1); } template<typename T1> static
wxString Format(const wxFormatString& f1, T1 a1) { typedef
const wxFormatString& TF1; const wxFormatString *fmt = (
(wxFormatStringArgumentFinder<TF1>::find(f1))); return DoFormatWchar
(f1, wxArgNormalizerWchar<T1>(a1, fmt, 1).get()); } template
<typename T1, typename T2> static wxString Format(const
wxFormatString& f1, T1 a1, T2 a2) { typedef const wxFormatString
& TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoFormatWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get()); } template<typename T1, typename T2, typename
T3> static wxString Format(const wxFormatString& f1, T1
a1, T2 a2, T3 a3) { typedef const wxFormatString& TF1; const
wxFormatString *fmt = ((wxFormatStringArgumentFinder<TF1>
::find(f1))); return DoFormatWchar(f1, wxArgNormalizerWchar<
T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt
, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get())
; } template<typename T1, typename T2, typename T3, typename
T4> static wxString Format(const wxFormatString& f1, T1
a1, T2 a2, T3 a3, T4 a4) { typedef const wxFormatString&
TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoFormatWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get()); } template
<typename T1, typename T2, typename T3, typename T4, typename
T5> static wxString Format(const wxFormatString& f1, T1
a1, T2 a2, T3 a3, T4 a4, T5 a5) { typedef const wxFormatString
& TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoFormatWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get()); } template<typename T1, typename
T2, typename T3, typename T4, typename T5, typename T6> static
wxString Format(const wxFormatString& f1, T1 a1, T2 a2, T3
a3, T4 a4, T5 a5, T6 a6) { typedef const wxFormatString&
TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoFormatWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get()); } template<typename T1, typename T2, typename
T3, typename T4, typename T5, typename T6, typename T7> static
wxString Format(const wxFormatString& f1, T1 a1, T2 a2, T3
a3, T4 a4, T5 a5, T6 a6, T7 a7) { typedef const wxFormatString
& TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoFormatWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get()); } template<typename T1, typename T2, typename T3,
typename T4, typename T5, typename T6, typename T7, typename
T8> static wxString Format(const wxFormatString& f1, T1
a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8) { typedef
const wxFormatString& TF1; const wxFormatString *fmt = (
(wxFormatStringArgumentFinder<TF1>::find(f1))); return DoFormatWchar
(f1, wxArgNormalizerWchar<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar
<T2>(a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(
a3, fmt, 3).get(), wxArgNormalizerWchar<T4>(a4, fmt, 4)
.get(), wxArgNormalizerWchar<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar
<T6>(a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(
a7, fmt, 7).get(), wxArgNormalizerWchar<T8>(a8, fmt, 8)
.get()); } template<typename T1, typename T2, typename T3,
typename T4, typename T5, typename T6, typename T7, typename
T8, typename T9> static wxString Format(const wxFormatString
& f1, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8
a8, T9 a9) { typedef const wxFormatString& TF1; const wxFormatString
*fmt = ((wxFormatStringArgumentFinder<TF1>::find(f1)))
; return DoFormatWchar(f1, wxArgNormalizerWchar<T1>(a1,
fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt, 2).get
(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(), wxArgNormalizerWchar
<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar<T5>(
a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(a6, fmt, 6)
.get(), wxArgNormalizerWchar<T7>(a7, fmt, 7).get(), wxArgNormalizerWchar
<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar<T9>(
a9, fmt, 9).get()); } template<typename T1, typename T2, typename
T3, typename T4, typename T5, typename T6, typename T7, typename
T8, typename T9, typename T10> static wxString Format(const
wxFormatString& f1, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6
a6, T7 a7, T8 a8, T9 a9, T10 a10) { typedef const wxFormatString
& TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoFormatWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get()); } template<typename T1, typename T2
, typename T3, typename T4, typename T5, typename T6, typename
T7, typename T8, typename T9, typename T10, typename T11>
static wxString Format(const wxFormatString& f1, T1 a1, T2
a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10
, T11 a11) { typedef const wxFormatString& TF1; const wxFormatString
*fmt = ((wxFormatStringArgumentFinder<TF1>::find(f1)))
; return DoFormatWchar(f1, wxArgNormalizerWchar<T1>(a1,
fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt, 2).get
(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(), wxArgNormalizerWchar
<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar<T5>(
a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(a6, fmt, 6)
.get(), wxArgNormalizerWchar<T7>(a7, fmt, 7).get(), wxArgNormalizerWchar
<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar<T9>(
a9, fmt, 9).get(), wxArgNormalizerWchar<T10>(a10, fmt, 10
).get(), wxArgNormalizerWchar<T11>(a11, fmt, 11).get())
; } template<typename T1, typename T2, typename T3, typename
T4, typename T5, typename T6, typename T7, typename T8, typename
T9, typename T10, typename T11, typename T12> static wxString
Format(const wxFormatString& f1, T1 a1, T2 a2, T3 a3, T4
a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12
a12) { typedef const wxFormatString& TF1; const wxFormatString
*fmt = ((wxFormatStringArgumentFinder<TF1>::find(f1)))
; return DoFormatWchar(f1, wxArgNormalizerWchar<T1>(a1,
fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt, 2).get
(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(), wxArgNormalizerWchar
<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar<T5>(
a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(a6, fmt, 6)
.get(), wxArgNormalizerWchar<T7>(a7, fmt, 7).get(), wxArgNormalizerWchar
<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar<T9>(
a9, fmt, 9).get(), wxArgNormalizerWchar<T10>(a10, fmt, 10
).get(), wxArgNormalizerWchar<T11>(a11, fmt, 11).get(),
wxArgNormalizerWchar<T12>(a12, fmt, 12).get()); } template
<typename T1, typename T2, typename T3, typename T4, typename
T5, typename T6, typename T7, typename T8, typename T9, typename
T10, typename T11, typename T12, typename T13> static wxString
Format(const wxFormatString& f1, T1 a1, T2 a2, T3 a3, T4
a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12
a12, T13 a13) { typedef const wxFormatString& TF1; const
wxFormatString *fmt = ((wxFormatStringArgumentFinder<TF1>
::find(f1))); return DoFormatWchar(f1, wxArgNormalizerWchar<
T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt
, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(),
wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get()); } template
<typename T1, typename T2, typename T3, typename T4, typename
T5, typename T6, typename T7, typename T8, typename T9, typename
T10, typename T11, typename T12, typename T13, typename T14>
static wxString Format(const wxFormatString& f1, T1 a1, T2
a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10
, T11 a11, T12 a12, T13 a13, T14 a14) { typedef const wxFormatString
& TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoFormatWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get()); } template<typename T1, typename
T2, typename T3, typename T4, typename T5, typename T6, typename
T7, typename T8, typename T9, typename T10, typename T11, typename
T12, typename T13, typename T14, typename T15> static wxString
Format(const wxFormatString& f1, T1 a1, T2 a2, T3 a3, T4
a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12
a12, T13 a13, T14 a14, T15 a15) { typedef const wxFormatString
& TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoFormatWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>
(a15, fmt, 15).get()); } template<typename T1, typename T2
, typename T3, typename T4, typename T5, typename T6, typename
T7, typename T8, typename T9, typename T10, typename T11, typename
T12, typename T13, typename T14, typename T15, typename T16>
static wxString Format(const wxFormatString& f1, T1 a1, T2
a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10
, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16) { typedef
const wxFormatString& TF1; const wxFormatString *fmt = (
(wxFormatStringArgumentFinder<TF1>::find(f1))); return DoFormatWchar
(f1, wxArgNormalizerWchar<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar
<T2>(a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(
a3, fmt, 3).get(), wxArgNormalizerWchar<T4>(a4, fmt, 4)
.get(), wxArgNormalizerWchar<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar
<T6>(a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(
a7, fmt, 7).get(), wxArgNormalizerWchar<T8>(a8, fmt, 8)
.get(), wxArgNormalizerWchar<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar
<T10>(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>
(a11, fmt, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt
, 12).get(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get
(), wxArgNormalizerWchar<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar
<T15>(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>
(a16, fmt, 16).get()); } template<typename T1, typename T2
, typename T3, typename T4, typename T5, typename T6, typename
T7, typename T8, typename T9, typename T10, typename T11, typename
T12, typename T13, typename T14, typename T15, typename T16,
typename T17> static wxString Format(const wxFormatString
& f1, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8
a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15
, T16 a16, T17 a17) { typedef const wxFormatString& TF1; const
wxFormatString *fmt = ((wxFormatStringArgumentFinder<TF1>
::find(f1))); return DoFormatWchar(f1, wxArgNormalizerWchar<
T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt
, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(),
wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>
(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt
, 16).get(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get
()); } template<typename T1, typename T2, typename T3, typename
T4, typename T5, typename T6, typename T7, typename T8, typename
T9, typename T10, typename T11, typename T12, typename T13, typename
T14, typename T15, typename T16, typename T17, typename T18>
static wxString Format(const wxFormatString& f1, T1 a1, T2
a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10
, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16, T17 a17
, T18 a18) { typedef const wxFormatString& TF1; const wxFormatString
*fmt = ((wxFormatStringArgumentFinder<TF1>::find(f1)))
; return DoFormatWchar(f1, wxArgNormalizerWchar<T1>(a1,
fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt, 2).get
(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(), wxArgNormalizerWchar
<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar<T5>(
a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(a6, fmt, 6)
.get(), wxArgNormalizerWchar<T7>(a7, fmt, 7).get(), wxArgNormalizerWchar
<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar<T9>(
a9, fmt, 9).get(), wxArgNormalizerWchar<T10>(a10, fmt, 10
).get(), wxArgNormalizerWchar<T11>(a11, fmt, 11).get(),
wxArgNormalizerWchar<T12>(a12, fmt, 12).get(), wxArgNormalizerWchar
<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar<T14>
(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>(a15, fmt
, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt, 16).get
(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get(), wxArgNormalizerWchar
<T18>(a18, fmt, 18).get()); } template<typename T1, typename
T2, typename T3, typename T4, typename T5, typename T6, typename
T7, typename T8, typename T9, typename T10, typename T11, typename
T12, typename T13, typename T14, typename T15, typename T16,
typename T17, typename T18, typename T19> static wxString
Format(const wxFormatString& f1, T1 a1, T2 a2, T3 a3, T4
a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12
a12, T13 a13, T14 a14, T15 a15, T16 a16, T17 a17, T18 a18, T19
a19) { typedef const wxFormatString& TF1; const wxFormatString
*fmt = ((wxFormatStringArgumentFinder<TF1>::find(f1)))
; return DoFormatWchar(f1, wxArgNormalizerWchar<T1>(a1,
fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt, 2).get
(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(), wxArgNormalizerWchar
<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar<T5>(
a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(a6, fmt, 6)
.get(), wxArgNormalizerWchar<T7>(a7, fmt, 7).get(), wxArgNormalizerWchar
<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar<T9>(
a9, fmt, 9).get(), wxArgNormalizerWchar<T10>(a10, fmt, 10
).get(), wxArgNormalizerWchar<T11>(a11, fmt, 11).get(),
wxArgNormalizerWchar<T12>(a12, fmt, 12).get(), wxArgNormalizerWchar
<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar<T14>
(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>(a15, fmt
, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt, 16).get
(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get(), wxArgNormalizerWchar
<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar<T19>
(a19, fmt, 19).get()); } template<typename T1, typename T2
, typename T3, typename T4, typename T5, typename T6, typename
T7, typename T8, typename T9, typename T10, typename T11, typename
T12, typename T13, typename T14, typename T15, typename T16,
typename T17, typename T18, typename T19, typename T20> static
wxString Format(const wxFormatString& f1, T1 a1, T2 a2, T3
a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11
, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16, T17 a17, T18 a18
, T19 a19, T20 a20) { typedef const wxFormatString& TF1; const
wxFormatString *fmt = ((wxFormatStringArgumentFinder<TF1>
::find(f1))); return DoFormatWchar(f1, wxArgNormalizerWchar<
T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt
, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(),
wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>
(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt
, 16).get(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get
(), wxArgNormalizerWchar<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar
<T19>(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>
(a20, fmt, 20).get()); } template<typename T1, typename T2
, typename T3, typename T4, typename T5, typename T6, typename
T7, typename T8, typename T9, typename T10, typename T11, typename
T12, typename T13, typename T14, typename T15, typename T16,
typename T17, typename T18, typename T19, typename T20, typename
T21> static wxString Format(const wxFormatString& f1,
T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9
, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16
, T17 a17, T18 a18, T19 a19, T20 a20, T21 a21) { typedef const
wxFormatString& TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoFormatWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>
(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt
, 16).get(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get
(), wxArgNormalizerWchar<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar
<T19>(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>
(a20, fmt, 20).get(), wxArgNormalizerWchar<T21>(a21, fmt
, 21).get()); } template<typename T1, typename T2, typename
T3, typename T4, typename T5, typename T6, typename T7, typename
T8, typename T9, typename T10, typename T11, typename T12, typename
T13, typename T14, typename T15, typename T16, typename T17,
typename T18, typename T19, typename T20, typename T21, typename
T22> static wxString Format(const wxFormatString& f1,
T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9
, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16
, T17 a17, T18 a18, T19 a19, T20 a20, T21 a21, T22 a22) { typedef
const wxFormatString& TF1; const wxFormatString *fmt = (
(wxFormatStringArgumentFinder<TF1>::find(f1))); return DoFormatWchar
(f1, wxArgNormalizerWchar<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar
<T2>(a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(
a3, fmt, 3).get(), wxArgNormalizerWchar<T4>(a4, fmt, 4)
.get(), wxArgNormalizerWchar<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar
<T6>(a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(
a7, fmt, 7).get(), wxArgNormalizerWchar<T8>(a8, fmt, 8)
.get(), wxArgNormalizerWchar<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar
<T10>(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>
(a11, fmt, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt
, 12).get(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get
(), wxArgNormalizerWchar<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar
<T15>(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>
(a16, fmt, 16).get(), wxArgNormalizerWchar<T17>(a17, fmt
, 17).get(), wxArgNormalizerWchar<T18>(a18, fmt, 18).get
(), wxArgNormalizerWchar<T19>(a19, fmt, 19).get(), wxArgNormalizerWchar
<T20>(a20, fmt, 20).get(), wxArgNormalizerWchar<T21>
(a21, fmt, 21).get(), wxArgNormalizerWchar<T22>(a22, fmt
, 22).get()); } template<typename T1, typename T2, typename
T3, typename T4, typename T5, typename T6, typename T7, typename
T8, typename T9, typename T10, typename T11, typename T12, typename
T13, typename T14, typename T15, typename T16, typename T17,
typename T18, typename T19, typename T20, typename T21, typename
T22, typename T23> static wxString Format(const wxFormatString
& f1, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8
a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15
, T16 a16, T17 a17, T18 a18, T19 a19, T20 a20, T21 a21, T22 a22
, T23 a23) { typedef const wxFormatString& TF1; const wxFormatString
*fmt = ((wxFormatStringArgumentFinder<TF1>::find(f1)))
; return DoFormatWchar(f1, wxArgNormalizerWchar<T1>(a1,
fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt, 2).get
(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(), wxArgNormalizerWchar
<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar<T5>(
a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(a6, fmt, 6)
.get(), wxArgNormalizerWchar<T7>(a7, fmt, 7).get(), wxArgNormalizerWchar
<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar<T9>(
a9, fmt, 9).get(), wxArgNormalizerWchar<T10>(a10, fmt, 10
).get(), wxArgNormalizerWchar<T11>(a11, fmt, 11).get(),
wxArgNormalizerWchar<T12>(a12, fmt, 12).get(), wxArgNormalizerWchar
<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar<T14>
(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>(a15, fmt
, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt, 16).get
(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get(), wxArgNormalizerWchar
<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar<T19>
(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>(a20, fmt
, 20).get(), wxArgNormalizerWchar<T21>(a21, fmt, 21).get
(), wxArgNormalizerWchar<T22>(a22, fmt, 22).get(), wxArgNormalizerWchar
<T23>(a23, fmt, 23).get()); } template<typename T1, typename
T2, typename T3, typename T4, typename T5, typename T6, typename
T7, typename T8, typename T9, typename T10, typename T11, typename
T12, typename T13, typename T14, typename T15, typename T16,
typename T17, typename T18, typename T19, typename T20, typename
T21, typename T22, typename T23, typename T24> static wxString
Format(const wxFormatString& f1, T1 a1, T2 a2, T3 a3, T4
a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12
a12, T13 a13, T14 a14, T15 a15, T16 a16, T17 a17, T18 a18, T19
a19, T20 a20, T21 a21, T22 a22, T23 a23, T24 a24) { typedef const
wxFormatString& TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoFormatWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>
(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt
, 16).get(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get
(), wxArgNormalizerWchar<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar
<T19>(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>
(a20, fmt, 20).get(), wxArgNormalizerWchar<T21>(a21, fmt
, 21).get(), wxArgNormalizerWchar<T22>(a22, fmt, 22).get
(), wxArgNormalizerWchar<T23>(a23, fmt, 23).get(), wxArgNormalizerWchar
<T24>(a24, fmt, 24).get()); } template<typename T1, typename
T2, typename T3, typename T4, typename T5, typename T6, typename
T7, typename T8, typename T9, typename T10, typename T11, typename
T12, typename T13, typename T14, typename T15, typename T16,
typename T17, typename T18, typename T19, typename T20, typename
T21, typename T22, typename T23, typename T24, typename T25>
static wxString Format(const wxFormatString& f1, T1 a1, T2
a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10
, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16, T17 a17
, T18 a18, T19 a19, T20 a20, T21 a21, T22 a22, T23 a23, T24 a24
, T25 a25) { typedef const wxFormatString& TF1; const wxFormatString
*fmt = ((wxFormatStringArgumentFinder<TF1>::find(f1)))
; return DoFormatWchar(f1, wxArgNormalizerWchar<T1>(a1,
fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt, 2).get
(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(), wxArgNormalizerWchar
<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar<T5>(
a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(a6, fmt, 6)
.get(), wxArgNormalizerWchar<T7>(a7, fmt, 7).get(), wxArgNormalizerWchar
<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar<T9>(
a9, fmt, 9).get(), wxArgNormalizerWchar<T10>(a10, fmt, 10
).get(), wxArgNormalizerWchar<T11>(a11, fmt, 11).get(),
wxArgNormalizerWchar<T12>(a12, fmt, 12).get(), wxArgNormalizerWchar
<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar<T14>
(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>(a15, fmt
, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt, 16).get
(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get(), wxArgNormalizerWchar
<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar<T19>
(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>(a20, fmt
, 20).get(), wxArgNormalizerWchar<T21>(a21, fmt, 21).get
(), wxArgNormalizerWchar<T22>(a22, fmt, 22).get(), wxArgNormalizerWchar
<T23>(a23, fmt, 23).get(), wxArgNormalizerWchar<T24>
(a24, fmt, 24).get(), wxArgNormalizerWchar<T25>(a25, fmt
, 25).get()); } template<typename T1, typename T2, typename
T3, typename T4, typename T5, typename T6, typename T7, typename
T8, typename T9, typename T10, typename T11, typename T12, typename
T13, typename T14, typename T15, typename T16, typename T17,
typename T18, typename T19, typename T20, typename T21, typename
T22, typename T23, typename T24, typename T25, typename T26>
static wxString Format(const wxFormatString& f1, T1 a1, T2
a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10
, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16, T17 a17
, T18 a18, T19 a19, T20 a20, T21 a21, T22 a22, T23 a23, T24 a24
, T25 a25, T26 a26) { typedef const wxFormatString& TF1; const
wxFormatString *fmt = ((wxFormatStringArgumentFinder<TF1>
::find(f1))); return DoFormatWchar(f1, wxArgNormalizerWchar<
T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt
, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(),
wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>
(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt
, 16).get(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get
(), wxArgNormalizerWchar<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar
<T19>(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>
(a20, fmt, 20).get(), wxArgNormalizerWchar<T21>(a21, fmt
, 21).get(), wxArgNormalizerWchar<T22>(a22, fmt, 22).get
(), wxArgNormalizerWchar<T23>(a23, fmt, 23).get(), wxArgNormalizerWchar
<T24>(a24, fmt, 24).get(), wxArgNormalizerWchar<T25>
(a25, fmt, 25).get(), wxArgNormalizerWchar<T26>(a26, fmt
, 26).get()); } template<typename T1, typename T2, typename
T3, typename T4, typename T5, typename T6, typename T7, typename
T8, typename T9, typename T10, typename T11, typename T12, typename
T13, typename T14, typename T15, typename T16, typename T17,
typename T18, typename T19, typename T20, typename T21, typename
T22, typename T23, typename T24, typename T25, typename T26,
typename T27> static wxString Format(const wxFormatString
& f1, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8
a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15
, T16 a16, T17 a17, T18 a18, T19 a19, T20 a20, T21 a21, T22 a22
, T23 a23, T24 a24, T25 a25, T26 a26, T27 a27) { typedef const
wxFormatString& TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoFormatWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>
(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt
, 16).get(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get
(), wxArgNormalizerWchar<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar
<T19>(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>
(a20, fmt, 20).get(), wxArgNormalizerWchar<T21>(a21, fmt
, 21).get(), wxArgNormalizerWchar<T22>(a22, fmt, 22).get
(), wxArgNormalizerWchar<T23>(a23, fmt, 23).get(), wxArgNormalizerWchar
<T24>(a24, fmt, 24).get(), wxArgNormalizerWchar<T25>
(a25, fmt, 25).get(), wxArgNormalizerWchar<T26>(a26, fmt
, 26).get(), wxArgNormalizerWchar<T27>(a27, fmt, 27).get
()); } template<typename T1, typename T2, typename T3, typename
T4, typename T5, typename T6, typename T7, typename T8, typename
T9, typename T10, typename T11, typename T12, typename T13, typename
T14, typename T15, typename T16, typename T17, typename T18,
typename T19, typename T20, typename T21, typename T22, typename
T23, typename T24, typename T25, typename T26, typename T27,
typename T28> static wxString Format(const wxFormatString
& f1, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8
a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15
, T16 a16, T17 a17, T18 a18, T19 a19, T20 a20, T21 a21, T22 a22
, T23 a23, T24 a24, T25 a25, T26 a26, T27 a27, T28 a28) { typedef
const wxFormatString& TF1; const wxFormatString *fmt = (
(wxFormatStringArgumentFinder<TF1>::find(f1))); return DoFormatWchar
(f1, wxArgNormalizerWchar<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar
<T2>(a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(
a3, fmt, 3).get(), wxArgNormalizerWchar<T4>(a4, fmt, 4)
.get(), wxArgNormalizerWchar<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar
<T6>(a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(
a7, fmt, 7).get(), wxArgNormalizerWchar<T8>(a8, fmt, 8)
.get(), wxArgNormalizerWchar<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar
<T10>(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>
(a11, fmt, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt
, 12).get(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get
(), wxArgNormalizerWchar<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar
<T15>(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>
(a16, fmt, 16).get(), wxArgNormalizerWchar<T17>(a17, fmt
, 17).get(), wxArgNormalizerWchar<T18>(a18, fmt, 18).get
(), wxArgNormalizerWchar<T19>(a19, fmt, 19).get(), wxArgNormalizerWchar
<T20>(a20, fmt, 20).get(), wxArgNormalizerWchar<T21>
(a21, fmt, 21).get(), wxArgNormalizerWchar<T22>(a22, fmt
, 22).get(), wxArgNormalizerWchar<T23>(a23, fmt, 23).get
(), wxArgNormalizerWchar<T24>(a24, fmt, 24).get(), wxArgNormalizerWchar
<T25>(a25, fmt, 25).get(), wxArgNormalizerWchar<T26>
(a26, fmt, 26).get(), wxArgNormalizerWchar<T27>(a27, fmt
, 27).get(), wxArgNormalizerWchar<T28>(a28, fmt, 28).get
()); } template<typename T1, typename T2, typename T3, typename
T4, typename T5, typename T6, typename T7, typename T8, typename
T9, typename T10, typename T11, typename T12, typename T13, typename
T14, typename T15, typename T16, typename T17, typename T18,
typename T19, typename T20, typename T21, typename T22, typename
T23, typename T24, typename T25, typename T26, typename T27,
typename T28, typename T29> static wxString Format(const wxFormatString
& f1, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8
a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15
, T16 a16, T17 a17, T18 a18, T19 a19, T20 a20, T21 a21, T22 a22
, T23 a23, T24 a24, T25 a25, T26 a26, T27 a27, T28 a28, T29 a29
) { typedef const wxFormatString& TF1; const wxFormatString
*fmt = ((wxFormatStringArgumentFinder<TF1>::find(f1)))
; return DoFormatWchar(f1, wxArgNormalizerWchar<T1>(a1,
fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt, 2).get
(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(), wxArgNormalizerWchar
<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar<T5>(
a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(a6, fmt, 6)
.get(), wxArgNormalizerWchar<T7>(a7, fmt, 7).get(), wxArgNormalizerWchar
<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar<T9>(
a9, fmt, 9).get(), wxArgNormalizerWchar<T10>(a10, fmt, 10
).get(), wxArgNormalizerWchar<T11>(a11, fmt, 11).get(),
wxArgNormalizerWchar<T12>(a12, fmt, 12).get(), wxArgNormalizerWchar
<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar<T14>
(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>(a15, fmt
, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt, 16).get
(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get(), wxArgNormalizerWchar
<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar<T19>
(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>(a20, fmt
, 20).get(), wxArgNormalizerWchar<T21>(a21, fmt, 21).get
(), wxArgNormalizerWchar<T22>(a22, fmt, 22).get(), wxArgNormalizerWchar
<T23>(a23, fmt, 23).get(), wxArgNormalizerWchar<T24>
(a24, fmt, 24).get(), wxArgNormalizerWchar<T25>(a25, fmt
, 25).get(), wxArgNormalizerWchar<T26>(a26, fmt, 26).get
(), wxArgNormalizerWchar<T27>(a27, fmt, 27).get(), wxArgNormalizerWchar
<T28>(a28, fmt, 28).get(), wxArgNormalizerWchar<T29>
(a29, fmt, 29).get()); } template<typename T1, typename T2
, typename T3, typename T4, typename T5, typename T6, typename
T7, typename T8, typename T9, typename T10, typename T11, typename
T12, typename T13, typename T14, typename T15, typename T16,
typename T17, typename T18, typename T19, typename T20, typename
T21, typename T22, typename T23, typename T24, typename T25,
typename T26, typename T27, typename T28, typename T29, typename
T30> static wxString Format(const wxFormatString& f1,
T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9
, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16
, T17 a17, T18 a18, T19 a19, T20 a20, T21 a21, T22 a22, T23 a23
, T24 a24, T25 a25, T26 a26, T27 a27, T28 a28, T29 a29, T30 a30
) { typedef const wxFormatString& TF1; const wxFormatString
*fmt = ((wxFormatStringArgumentFinder<TF1>::find(f1)))
; return DoFormatWchar(f1, wxArgNormalizerWchar<T1>(a1,
fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt, 2).get
(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(), wxArgNormalizerWchar
<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar<T5>(
a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(a6, fmt, 6)
.get(), wxArgNormalizerWchar<T7>(a7, fmt, 7).get(), wxArgNormalizerWchar
<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar<T9>(
a9, fmt, 9).get(), wxArgNormalizerWchar<T10>(a10, fmt, 10
).get(), wxArgNormalizerWchar<T11>(a11, fmt, 11).get(),
wxArgNormalizerWchar<T12>(a12, fmt, 12).get(), wxArgNormalizerWchar
<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar<T14>
(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>(a15, fmt
, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt, 16).get
(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get(), wxArgNormalizerWchar
<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar<T19>
(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>(a20, fmt
, 20).get(), wxArgNormalizerWchar<T21>(a21, fmt, 21).get
(), wxArgNormalizerWchar<T22>(a22, fmt, 22).get(), wxArgNormalizerWchar
<T23>(a23, fmt, 23).get(), wxArgNormalizerWchar<T24>
(a24, fmt, 24).get(), wxArgNormalizerWchar<T25>(a25, fmt
, 25).get(), wxArgNormalizerWchar<T26>(a26, fmt, 26).get
(), wxArgNormalizerWchar<T27>(a27, fmt, 27).get(), wxArgNormalizerWchar
<T28>(a28, fmt, 28).get(), wxArgNormalizerWchar<T29>
(a29, fmt, 29).get(), wxArgNormalizerWchar<T30>(a30, fmt
, 30).get()); }
2430 // the same as above, but takes a va_list
2431 static wxString FormatV(const wxString& format, va_list argptr);
2432
2433 // raw access to string memory
2434 // ensure that string has space for at least nLen characters
2435 // only works if the data of this string is not shared
2436 bool Alloc(size_t nLen) { reserve(nLen); return capacity() >= nLen; }
2437 // minimize the string's memory
2438 // only works if the data of this string is not shared
2439 bool Shrink();
2440#if WXWIN_COMPATIBILITY_2_80 && !wxUSE_STL_BASED_WXSTRING1 && !wxUSE_UNICODE_UTF80
2441 // These are deprecated, use wxStringBuffer or wxStringBufferLength instead
2442 //
2443 // get writable buffer of at least nLen bytes. Unget() *must* be called
2444 // a.s.a.p. to put string back in a reasonable state!
2445 wxDEPRECATED( wxStringCharType *GetWriteBuf(size_t nLen) )__attribute__((deprecated)) wxStringCharType *GetWriteBuf(size_t
nLen)
;
2446 // call this immediately after GetWriteBuf() has been used
2447 wxDEPRECATED( void UngetWriteBuf() )__attribute__((deprecated)) void UngetWriteBuf();
2448 wxDEPRECATED( void UngetWriteBuf(size_t nLen) )__attribute__((deprecated)) void UngetWriteBuf(size_t nLen);
2449#endif // WXWIN_COMPATIBILITY_2_8 && !wxUSE_STL_BASED_WXSTRING && wxUSE_UNICODE_UTF8
2450
2451 // wxWidgets version 1 compatibility functions
2452
2453 // use Mid()
2454 wxString SubString(size_t from, size_t to) const
2455 { return Mid(from, (to - from + 1)); }
2456 // values for second parameter of CompareTo function
2457 enum caseCompare {exact, ignoreCase};
2458 // values for first parameter of Strip function
2459 enum stripType {leading = 0x1, trailing = 0x2, both = 0x3};
2460
2461 // use Printf()
2462 // (take 'this' into account in attribute parameter count)
2463 // int sprintf(const wxString& format, ...) WX_ATTRIBUTE_PRINTF_2;
2464 WX_DEFINE_VARARG_FUNC(int, sprintf, 1, (const wxFormatString&),inline int sprintf(const wxFormatString& f1) { return DoPrintfWchar
(f1); } template<typename T1> int sprintf(const wxFormatString
& f1, T1 a1) { typedef const wxFormatString& TF1; const
wxFormatString *fmt = ((wxFormatStringArgumentFinder<TF1>
::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar<
T1>(a1, fmt, 1).get()); } template<typename T1, typename
T2> int sprintf(const wxFormatString& f1, T1 a1, T2 a2
) { typedef const wxFormatString& TF1; const wxFormatString
*fmt = ((wxFormatStringArgumentFinder<TF1>::find(f1)))
; return DoPrintfWchar(f1, wxArgNormalizerWchar<T1>(a1,
fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt, 2).get
()); } template<typename T1, typename T2, typename T3> int
sprintf(const wxFormatString& f1, T1 a1, T2 a2, T3 a3) {
typedef const wxFormatString& TF1; const wxFormatString *
fmt = ((wxFormatStringArgumentFinder<TF1>::find(f1))); return
DoPrintfWchar(f1, wxArgNormalizerWchar<T1>(a1, fmt, 1)
.get(), wxArgNormalizerWchar<T2>(a2, fmt, 2).get(), wxArgNormalizerWchar
<T3>(a3, fmt, 3).get()); } template<typename T1, typename
T2, typename T3, typename T4> int sprintf(const wxFormatString
& f1, T1 a1, T2 a2, T3 a3, T4 a4) { typedef const wxFormatString
& TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get()); } template
<typename T1, typename T2, typename T3, typename T4, typename
T5> int sprintf(const wxFormatString& f1, T1 a1, T2 a2
, T3 a3, T4 a4, T5 a5) { typedef const wxFormatString& TF1
; const wxFormatString *fmt = ((wxFormatStringArgumentFinder<
TF1>::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get()); } template<typename T1, typename
T2, typename T3, typename T4, typename T5, typename T6> int
sprintf(const wxFormatString& f1, T1 a1, T2 a2, T3 a3, T4
a4, T5 a5, T6 a6) { typedef const wxFormatString& TF1; const
wxFormatString *fmt = ((wxFormatStringArgumentFinder<TF1>
::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar<
T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt
, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(),
wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get()); } template<typename T1, typename T2, typename
T3, typename T4, typename T5, typename T6, typename T7> int
sprintf(const wxFormatString& f1, T1 a1, T2 a2, T3 a3, T4
a4, T5 a5, T6 a6, T7 a7) { typedef const wxFormatString&
TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get()); } template<typename T1, typename T2, typename T3,
typename T4, typename T5, typename T6, typename T7, typename
T8> int sprintf(const wxFormatString& f1, T1 a1, T2 a2
, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8) { typedef const wxFormatString
& TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get()); } template
<typename T1, typename T2, typename T3, typename T4, typename
T5, typename T6, typename T7, typename T8, typename T9> int
sprintf(const wxFormatString& f1, T1 a1, T2 a2, T3 a3, T4
a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9) { typedef const wxFormatString
& TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get()); } template<typename T1, typename
T2, typename T3, typename T4, typename T5, typename T6, typename
T7, typename T8, typename T9, typename T10> int sprintf(const
wxFormatString& f1, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6
a6, T7 a7, T8 a8, T9 a9, T10 a10) { typedef const wxFormatString
& TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get()); } template<typename T1, typename T2
, typename T3, typename T4, typename T5, typename T6, typename
T7, typename T8, typename T9, typename T10, typename T11>
int sprintf(const wxFormatString& f1, T1 a1, T2 a2, T3 a3
, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11)
{ typedef const wxFormatString& TF1; const wxFormatString
*fmt = ((wxFormatStringArgumentFinder<TF1>::find(f1)))
; return DoPrintfWchar(f1, wxArgNormalizerWchar<T1>(a1,
fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt, 2).get
(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(), wxArgNormalizerWchar
<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar<T5>(
a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(a6, fmt, 6)
.get(), wxArgNormalizerWchar<T7>(a7, fmt, 7).get(), wxArgNormalizerWchar
<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar<T9>(
a9, fmt, 9).get(), wxArgNormalizerWchar<T10>(a10, fmt, 10
).get(), wxArgNormalizerWchar<T11>(a11, fmt, 11).get())
; } template<typename T1, typename T2, typename T3, typename
T4, typename T5, typename T6, typename T7, typename T8, typename
T9, typename T10, typename T11, typename T12> int sprintf
(const wxFormatString& f1, T1 a1, T2 a2, T3 a3, T4 a4, T5
a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12) {
typedef const wxFormatString& TF1; const wxFormatString *
fmt = ((wxFormatStringArgumentFinder<TF1>::find(f1))); return
DoPrintfWchar(f1, wxArgNormalizerWchar<T1>(a1, fmt, 1)
.get(), wxArgNormalizerWchar<T2>(a2, fmt, 2).get(), wxArgNormalizerWchar
<T3>(a3, fmt, 3).get(), wxArgNormalizerWchar<T4>(
a4, fmt, 4).get(), wxArgNormalizerWchar<T5>(a5, fmt, 5)
.get(), wxArgNormalizerWchar<T6>(a6, fmt, 6).get(), wxArgNormalizerWchar
<T7>(a7, fmt, 7).get(), wxArgNormalizerWchar<T8>(
a8, fmt, 8).get(), wxArgNormalizerWchar<T9>(a9, fmt, 9)
.get(), wxArgNormalizerWchar<T10>(a10, fmt, 10).get(), wxArgNormalizerWchar
<T11>(a11, fmt, 11).get(), wxArgNormalizerWchar<T12>
(a12, fmt, 12).get()); } template<typename T1, typename T2
, typename T3, typename T4, typename T5, typename T6, typename
T7, typename T8, typename T9, typename T10, typename T11, typename
T12, typename T13> int sprintf(const wxFormatString& f1
, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9
, T10 a10, T11 a11, T12 a12, T13 a13) { typedef const wxFormatString
& TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get()); } template
<typename T1, typename T2, typename T3, typename T4, typename
T5, typename T6, typename T7, typename T8, typename T9, typename
T10, typename T11, typename T12, typename T13, typename T14>
int sprintf(const wxFormatString& f1, T1 a1, T2 a2, T3 a3
, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11,
T12 a12, T13 a13, T14 a14) { typedef const wxFormatString&
TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get()); } template<typename T1, typename
T2, typename T3, typename T4, typename T5, typename T6, typename
T7, typename T8, typename T9, typename T10, typename T11, typename
T12, typename T13, typename T14, typename T15> int sprintf
(const wxFormatString& f1, T1 a1, T2 a2, T3 a3, T4 a4, T5
a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13
a13, T14 a14, T15 a15) { typedef const wxFormatString& TF1
; const wxFormatString *fmt = ((wxFormatStringArgumentFinder<
TF1>::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>
(a15, fmt, 15).get()); } template<typename T1, typename T2
, typename T3, typename T4, typename T5, typename T6, typename
T7, typename T8, typename T9, typename T10, typename T11, typename
T12, typename T13, typename T14, typename T15, typename T16>
int sprintf(const wxFormatString& f1, T1 a1, T2 a2, T3 a3
, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11,
T12 a12, T13 a13, T14 a14, T15 a15, T16 a16) { typedef const
wxFormatString& TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>
(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt
, 16).get()); } template<typename T1, typename T2, typename
T3, typename T4, typename T5, typename T6, typename T7, typename
T8, typename T9, typename T10, typename T11, typename T12, typename
T13, typename T14, typename T15, typename T16, typename T17>
int sprintf(const wxFormatString& f1, T1 a1, T2 a2, T3 a3
, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11,
T12 a12, T13 a13, T14 a14, T15 a15, T16 a16, T17 a17) { typedef
const wxFormatString& TF1; const wxFormatString *fmt = (
(wxFormatStringArgumentFinder<TF1>::find(f1))); return DoPrintfWchar
(f1, wxArgNormalizerWchar<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar
<T2>(a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(
a3, fmt, 3).get(), wxArgNormalizerWchar<T4>(a4, fmt, 4)
.get(), wxArgNormalizerWchar<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar
<T6>(a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(
a7, fmt, 7).get(), wxArgNormalizerWchar<T8>(a8, fmt, 8)
.get(), wxArgNormalizerWchar<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar
<T10>(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>
(a11, fmt, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt
, 12).get(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get
(), wxArgNormalizerWchar<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar
<T15>(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>
(a16, fmt, 16).get(), wxArgNormalizerWchar<T17>(a17, fmt
, 17).get()); } template<typename T1, typename T2, typename
T3, typename T4, typename T5, typename T6, typename T7, typename
T8, typename T9, typename T10, typename T11, typename T12, typename
T13, typename T14, typename T15, typename T16, typename T17,
typename T18> int sprintf(const wxFormatString& f1, T1
a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10
a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16, T17
a17, T18 a18) { typedef const wxFormatString& TF1; const
wxFormatString *fmt = ((wxFormatStringArgumentFinder<TF1>
::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar<
T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt
, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(),
wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>
(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt
, 16).get(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get
(), wxArgNormalizerWchar<T18>(a18, fmt, 18).get()); } template
<typename T1, typename T2, typename T3, typename T4, typename
T5, typename T6, typename T7, typename T8, typename T9, typename
T10, typename T11, typename T12, typename T13, typename T14,
typename T15, typename T16, typename T17, typename T18, typename
T19> int sprintf(const wxFormatString& f1, T1 a1, T2 a2
, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11
a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16, T17 a17, T18
a18, T19 a19) { typedef const wxFormatString& TF1; const
wxFormatString *fmt = ((wxFormatStringArgumentFinder<TF1>
::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar<
T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt
, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(),
wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>
(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt
, 16).get(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get
(), wxArgNormalizerWchar<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar
<T19>(a19, fmt, 19).get()); } template<typename T1, typename
T2, typename T3, typename T4, typename T5, typename T6, typename
T7, typename T8, typename T9, typename T10, typename T11, typename
T12, typename T13, typename T14, typename T15, typename T16,
typename T17, typename T18, typename T19, typename T20> int
sprintf(const wxFormatString& f1, T1 a1, T2 a2, T3 a3, T4
a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12
a12, T13 a13, T14 a14, T15 a15, T16 a16, T17 a17, T18 a18, T19
a19, T20 a20) { typedef const wxFormatString& TF1; const
wxFormatString *fmt = ((wxFormatStringArgumentFinder<TF1>
::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar<
T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt
, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(),
wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>
(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt
, 16).get(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get
(), wxArgNormalizerWchar<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar
<T19>(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>
(a20, fmt, 20).get()); } template<typename T1, typename T2
, typename T3, typename T4, typename T5, typename T6, typename
T7, typename T8, typename T9, typename T10, typename T11, typename
T12, typename T13, typename T14, typename T15, typename T16,
typename T17, typename T18, typename T19, typename T20, typename
T21> int sprintf(const wxFormatString& f1, T1 a1, T2 a2
, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11
a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16, T17 a17, T18
a18, T19 a19, T20 a20, T21 a21) { typedef const wxFormatString
& TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>
(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt
, 16).get(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get
(), wxArgNormalizerWchar<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar
<T19>(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>
(a20, fmt, 20).get(), wxArgNormalizerWchar<T21>(a21, fmt
, 21).get()); } template<typename T1, typename T2, typename
T3, typename T4, typename T5, typename T6, typename T7, typename
T8, typename T9, typename T10, typename T11, typename T12, typename
T13, typename T14, typename T15, typename T16, typename T17,
typename T18, typename T19, typename T20, typename T21, typename
T22> int sprintf(const wxFormatString& f1, T1 a1, T2 a2
, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11
a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16, T17 a17, T18
a18, T19 a19, T20 a20, T21 a21, T22 a22) { typedef const wxFormatString
& TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>
(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt
, 16).get(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get
(), wxArgNormalizerWchar<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar
<T19>(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>
(a20, fmt, 20).get(), wxArgNormalizerWchar<T21>(a21, fmt
, 21).get(), wxArgNormalizerWchar<T22>(a22, fmt, 22).get
()); } template<typename T1, typename T2, typename T3, typename
T4, typename T5, typename T6, typename T7, typename T8, typename
T9, typename T10, typename T11, typename T12, typename T13, typename
T14, typename T15, typename T16, typename T17, typename T18,
typename T19, typename T20, typename T21, typename T22, typename
T23> int sprintf(const wxFormatString& f1, T1 a1, T2 a2
, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11
a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16, T17 a17, T18
a18, T19 a19, T20 a20, T21 a21, T22 a22, T23 a23) { typedef const
wxFormatString& TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>
(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt
, 16).get(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get
(), wxArgNormalizerWchar<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar
<T19>(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>
(a20, fmt, 20).get(), wxArgNormalizerWchar<T21>(a21, fmt
, 21).get(), wxArgNormalizerWchar<T22>(a22, fmt, 22).get
(), wxArgNormalizerWchar<T23>(a23, fmt, 23).get()); } template
<typename T1, typename T2, typename T3, typename T4, typename
T5, typename T6, typename T7, typename T8, typename T9, typename
T10, typename T11, typename T12, typename T13, typename T14,
typename T15, typename T16, typename T17, typename T18, typename
T19, typename T20, typename T21, typename T22, typename T23,
typename T24> int sprintf(const wxFormatString& f1, T1
a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10
a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16, T17
a17, T18 a18, T19 a19, T20 a20, T21 a21, T22 a22, T23 a23, T24
a24) { typedef const wxFormatString& TF1; const wxFormatString
*fmt = ((wxFormatStringArgumentFinder<TF1>::find(f1)))
; return DoPrintfWchar(f1, wxArgNormalizerWchar<T1>(a1,
fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt, 2).get
(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(), wxArgNormalizerWchar
<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar<T5>(
a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(a6, fmt, 6)
.get(), wxArgNormalizerWchar<T7>(a7, fmt, 7).get(), wxArgNormalizerWchar
<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar<T9>(
a9, fmt, 9).get(), wxArgNormalizerWchar<T10>(a10, fmt, 10
).get(), wxArgNormalizerWchar<T11>(a11, fmt, 11).get(),
wxArgNormalizerWchar<T12>(a12, fmt, 12).get(), wxArgNormalizerWchar
<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar<T14>
(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>(a15, fmt
, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt, 16).get
(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get(), wxArgNormalizerWchar
<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar<T19>
(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>(a20, fmt
, 20).get(), wxArgNormalizerWchar<T21>(a21, fmt, 21).get
(), wxArgNormalizerWchar<T22>(a22, fmt, 22).get(), wxArgNormalizerWchar
<T23>(a23, fmt, 23).get(), wxArgNormalizerWchar<T24>
(a24, fmt, 24).get()); } template<typename T1, typename T2
, typename T3, typename T4, typename T5, typename T6, typename
T7, typename T8, typename T9, typename T10, typename T11, typename
T12, typename T13, typename T14, typename T15, typename T16,
typename T17, typename T18, typename T19, typename T20, typename
T21, typename T22, typename T23, typename T24, typename T25>
int sprintf(const wxFormatString& f1, T1 a1, T2 a2, T3 a3
, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11,
T12 a12, T13 a13, T14 a14, T15 a15, T16 a16, T17 a17, T18 a18
, T19 a19, T20 a20, T21 a21, T22 a22, T23 a23, T24 a24, T25 a25
) { typedef const wxFormatString& TF1; const wxFormatString
*fmt = ((wxFormatStringArgumentFinder<TF1>::find(f1)))
; return DoPrintfWchar(f1, wxArgNormalizerWchar<T1>(a1,
fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt, 2).get
(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(), wxArgNormalizerWchar
<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar<T5>(
a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(a6, fmt, 6)
.get(), wxArgNormalizerWchar<T7>(a7, fmt, 7).get(), wxArgNormalizerWchar
<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar<T9>(
a9, fmt, 9).get(), wxArgNormalizerWchar<T10>(a10, fmt, 10
).get(), wxArgNormalizerWchar<T11>(a11, fmt, 11).get(),
wxArgNormalizerWchar<T12>(a12, fmt, 12).get(), wxArgNormalizerWchar
<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar<T14>
(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>(a15, fmt
, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt, 16).get
(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get(), wxArgNormalizerWchar
<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar<T19>
(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>(a20, fmt
, 20).get(), wxArgNormalizerWchar<T21>(a21, fmt, 21).get
(), wxArgNormalizerWchar<T22>(a22, fmt, 22).get(), wxArgNormalizerWchar
<T23>(a23, fmt, 23).get(), wxArgNormalizerWchar<T24>
(a24, fmt, 24).get(), wxArgNormalizerWchar<T25>(a25, fmt
, 25).get()); } template<typename T1, typename T2, typename
T3, typename T4, typename T5, typename T6, typename T7, typename
T8, typename T9, typename T10, typename T11, typename T12, typename
T13, typename T14, typename T15, typename T16, typename T17,
typename T18, typename T19, typename T20, typename T21, typename
T22, typename T23, typename T24, typename T25, typename T26>
int sprintf(const wxFormatString& f1, T1 a1, T2 a2, T3 a3
, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11,
T12 a12, T13 a13, T14 a14, T15 a15, T16 a16, T17 a17, T18 a18
, T19 a19, T20 a20, T21 a21, T22 a22, T23 a23, T24 a24, T25 a25
, T26 a26) { typedef const wxFormatString& TF1; const wxFormatString
*fmt = ((wxFormatStringArgumentFinder<TF1>::find(f1)))
; return DoPrintfWchar(f1, wxArgNormalizerWchar<T1>(a1,
fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt, 2).get
(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(), wxArgNormalizerWchar
<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar<T5>(
a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(a6, fmt, 6)
.get(), wxArgNormalizerWchar<T7>(a7, fmt, 7).get(), wxArgNormalizerWchar
<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar<T9>(
a9, fmt, 9).get(), wxArgNormalizerWchar<T10>(a10, fmt, 10
).get(), wxArgNormalizerWchar<T11>(a11, fmt, 11).get(),
wxArgNormalizerWchar<T12>(a12, fmt, 12).get(), wxArgNormalizerWchar
<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar<T14>
(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>(a15, fmt
, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt, 16).get
(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get(), wxArgNormalizerWchar
<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar<T19>
(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>(a20, fmt
, 20).get(), wxArgNormalizerWchar<T21>(a21, fmt, 21).get
(), wxArgNormalizerWchar<T22>(a22, fmt, 22).get(), wxArgNormalizerWchar
<T23>(a23, fmt, 23).get(), wxArgNormalizerWchar<T24>
(a24, fmt, 24).get(), wxArgNormalizerWchar<T25>(a25, fmt
, 25).get(), wxArgNormalizerWchar<T26>(a26, fmt, 26).get
()); } template<typename T1, typename T2, typename T3, typename
T4, typename T5, typename T6, typename T7, typename T8, typename
T9, typename T10, typename T11, typename T12, typename T13, typename
T14, typename T15, typename T16, typename T17, typename T18,
typename T19, typename T20, typename T21, typename T22, typename
T23, typename T24, typename T25, typename T26, typename T27>
int sprintf(const wxFormatString& f1, T1 a1, T2 a2, T3 a3
, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11,
T12 a12, T13 a13, T14 a14, T15 a15, T16 a16, T17 a17, T18 a18
, T19 a19, T20 a20, T21 a21, T22 a22, T23 a23, T24 a24, T25 a25
, T26 a26, T27 a27) { typedef const wxFormatString& TF1; const
wxFormatString *fmt = ((wxFormatStringArgumentFinder<TF1>
::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar<
T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt
, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(),
wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>
(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt
, 16).get(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get
(), wxArgNormalizerWchar<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar
<T19>(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>
(a20, fmt, 20).get(), wxArgNormalizerWchar<T21>(a21, fmt
, 21).get(), wxArgNormalizerWchar<T22>(a22, fmt, 22).get
(), wxArgNormalizerWchar<T23>(a23, fmt, 23).get(), wxArgNormalizerWchar
<T24>(a24, fmt, 24).get(), wxArgNormalizerWchar<T25>
(a25, fmt, 25).get(), wxArgNormalizerWchar<T26>(a26, fmt
, 26).get(), wxArgNormalizerWchar<T27>(a27, fmt, 27).get
()); } template<typename T1, typename T2, typename T3, typename
T4, typename T5, typename T6, typename T7, typename T8, typename
T9, typename T10, typename T11, typename T12, typename T13, typename
T14, typename T15, typename T16, typename T17, typename T18,
typename T19, typename T20, typename T21, typename T22, typename
T23, typename T24, typename T25, typename T26, typename T27,
typename T28> int sprintf(const wxFormatString& f1, T1
a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10
a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16, T17
a17, T18 a18, T19 a19, T20 a20, T21 a21, T22 a22, T23 a23, T24
a24, T25 a25, T26 a26, T27 a27, T28 a28) { typedef const wxFormatString
& TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>
(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt
, 16).get(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get
(), wxArgNormalizerWchar<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar
<T19>(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>
(a20, fmt, 20).get(), wxArgNormalizerWchar<T21>(a21, fmt
, 21).get(), wxArgNormalizerWchar<T22>(a22, fmt, 22).get
(), wxArgNormalizerWchar<T23>(a23, fmt, 23).get(), wxArgNormalizerWchar
<T24>(a24, fmt, 24).get(), wxArgNormalizerWchar<T25>
(a25, fmt, 25).get(), wxArgNormalizerWchar<T26>(a26, fmt
, 26).get(), wxArgNormalizerWchar<T27>(a27, fmt, 27).get
(), wxArgNormalizerWchar<T28>(a28, fmt, 28).get()); } template
<typename T1, typename T2, typename T3, typename T4, typename
T5, typename T6, typename T7, typename T8, typename T9, typename
T10, typename T11, typename T12, typename T13, typename T14,
typename T15, typename T16, typename T17, typename T18, typename
T19, typename T20, typename T21, typename T22, typename T23,
typename T24, typename T25, typename T26, typename T27, typename
T28, typename T29> int sprintf(const wxFormatString& f1
, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9
, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16
, T17 a17, T18 a18, T19 a19, T20 a20, T21 a21, T22 a22, T23 a23
, T24 a24, T25 a25, T26 a26, T27 a27, T28 a28, T29 a29) { typedef
const wxFormatString& TF1; const wxFormatString *fmt = (
(wxFormatStringArgumentFinder<TF1>::find(f1))); return DoPrintfWchar
(f1, wxArgNormalizerWchar<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar
<T2>(a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(
a3, fmt, 3).get(), wxArgNormalizerWchar<T4>(a4, fmt, 4)
.get(), wxArgNormalizerWchar<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar
<T6>(a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(
a7, fmt, 7).get(), wxArgNormalizerWchar<T8>(a8, fmt, 8)
.get(), wxArgNormalizerWchar<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar
<T10>(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>
(a11, fmt, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt
, 12).get(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get
(), wxArgNormalizerWchar<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar
<T15>(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>
(a16, fmt, 16).get(), wxArgNormalizerWchar<T17>(a17, fmt
, 17).get(), wxArgNormalizerWchar<T18>(a18, fmt, 18).get
(), wxArgNormalizerWchar<T19>(a19, fmt, 19).get(), wxArgNormalizerWchar
<T20>(a20, fmt, 20).get(), wxArgNormalizerWchar<T21>
(a21, fmt, 21).get(), wxArgNormalizerWchar<T22>(a22, fmt
, 22).get(), wxArgNormalizerWchar<T23>(a23, fmt, 23).get
(), wxArgNormalizerWchar<T24>(a24, fmt, 24).get(), wxArgNormalizerWchar
<T25>(a25, fmt, 25).get(), wxArgNormalizerWchar<T26>
(a26, fmt, 26).get(), wxArgNormalizerWchar<T27>(a27, fmt
, 27).get(), wxArgNormalizerWchar<T28>(a28, fmt, 28).get
(), wxArgNormalizerWchar<T29>(a29, fmt, 29).get()); } template
<typename T1, typename T2, typename T3, typename T4, typename
T5, typename T6, typename T7, typename T8, typename T9, typename
T10, typename T11, typename T12, typename T13, typename T14,
typename T15, typename T16, typename T17, typename T18, typename
T19, typename T20, typename T21, typename T22, typename T23,
typename T24, typename T25, typename T26, typename T27, typename
T28, typename T29, typename T30> int sprintf(const wxFormatString
& f1, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8
a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15
, T16 a16, T17 a17, T18 a18, T19 a19, T20 a20, T21 a21, T22 a22
, T23 a23, T24 a24, T25 a25, T26 a26, T27 a27, T28 a28, T29 a29
, T30 a30) { typedef const wxFormatString& TF1; const wxFormatString
*fmt = ((wxFormatStringArgumentFinder<TF1>::find(f1)))
; return DoPrintfWchar(f1, wxArgNormalizerWchar<T1>(a1,
fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt, 2).get
(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(), wxArgNormalizerWchar
<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar<T5>(
a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(a6, fmt, 6)
.get(), wxArgNormalizerWchar<T7>(a7, fmt, 7).get(), wxArgNormalizerWchar
<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar<T9>(
a9, fmt, 9).get(), wxArgNormalizerWchar<T10>(a10, fmt, 10
).get(), wxArgNormalizerWchar<T11>(a11, fmt, 11).get(),
wxArgNormalizerWchar<T12>(a12, fmt, 12).get(), wxArgNormalizerWchar
<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar<T14>
(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>(a15, fmt
, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt, 16).get
(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get(), wxArgNormalizerWchar
<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar<T19>
(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>(a20, fmt
, 20).get(), wxArgNormalizerWchar<T21>(a21, fmt, 21).get
(), wxArgNormalizerWchar<T22>(a22, fmt, 22).get(), wxArgNormalizerWchar
<T23>(a23, fmt, 23).get(), wxArgNormalizerWchar<T24>
(a24, fmt, 24).get(), wxArgNormalizerWchar<T25>(a25, fmt
, 25).get(), wxArgNormalizerWchar<T26>(a26, fmt, 26).get
(), wxArgNormalizerWchar<T27>(a27, fmt, 27).get(), wxArgNormalizerWchar
<T28>(a28, fmt, 28).get(), wxArgNormalizerWchar<T29>
(a29, fmt, 29).get(), wxArgNormalizerWchar<T30>(a30, fmt
, 30).get()); }
2465 DoPrintfWchar, DoPrintfUtf8)inline int sprintf(const wxFormatString& f1) { return DoPrintfWchar
(f1); } template<typename T1> int sprintf(const wxFormatString
& f1, T1 a1) { typedef const wxFormatString& TF1; const
wxFormatString *fmt = ((wxFormatStringArgumentFinder<TF1>
::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar<
T1>(a1, fmt, 1).get()); } template<typename T1, typename
T2> int sprintf(const wxFormatString& f1, T1 a1, T2 a2
) { typedef const wxFormatString& TF1; const wxFormatString
*fmt = ((wxFormatStringArgumentFinder<TF1>::find(f1)))
; return DoPrintfWchar(f1, wxArgNormalizerWchar<T1>(a1,
fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt, 2).get
()); } template<typename T1, typename T2, typename T3> int
sprintf(const wxFormatString& f1, T1 a1, T2 a2, T3 a3) {
typedef const wxFormatString& TF1; const wxFormatString *
fmt = ((wxFormatStringArgumentFinder<TF1>::find(f1))); return
DoPrintfWchar(f1, wxArgNormalizerWchar<T1>(a1, fmt, 1)
.get(), wxArgNormalizerWchar<T2>(a2, fmt, 2).get(), wxArgNormalizerWchar
<T3>(a3, fmt, 3).get()); } template<typename T1, typename
T2, typename T3, typename T4> int sprintf(const wxFormatString
& f1, T1 a1, T2 a2, T3 a3, T4 a4) { typedef const wxFormatString
& TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get()); } template
<typename T1, typename T2, typename T3, typename T4, typename
T5> int sprintf(const wxFormatString& f1, T1 a1, T2 a2
, T3 a3, T4 a4, T5 a5) { typedef const wxFormatString& TF1
; const wxFormatString *fmt = ((wxFormatStringArgumentFinder<
TF1>::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get()); } template<typename T1, typename
T2, typename T3, typename T4, typename T5, typename T6> int
sprintf(const wxFormatString& f1, T1 a1, T2 a2, T3 a3, T4
a4, T5 a5, T6 a6) { typedef const wxFormatString& TF1; const
wxFormatString *fmt = ((wxFormatStringArgumentFinder<TF1>
::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar<
T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt
, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(),
wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get()); } template<typename T1, typename T2, typename
T3, typename T4, typename T5, typename T6, typename T7> int
sprintf(const wxFormatString& f1, T1 a1, T2 a2, T3 a3, T4
a4, T5 a5, T6 a6, T7 a7) { typedef const wxFormatString&
TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get()); } template<typename T1, typename T2, typename T3,
typename T4, typename T5, typename T6, typename T7, typename
T8> int sprintf(const wxFormatString& f1, T1 a1, T2 a2
, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8) { typedef const wxFormatString
& TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get()); } template
<typename T1, typename T2, typename T3, typename T4, typename
T5, typename T6, typename T7, typename T8, typename T9> int
sprintf(const wxFormatString& f1, T1 a1, T2 a2, T3 a3, T4
a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9) { typedef const wxFormatString
& TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get()); } template<typename T1, typename
T2, typename T3, typename T4, typename T5, typename T6, typename
T7, typename T8, typename T9, typename T10> int sprintf(const
wxFormatString& f1, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6
a6, T7 a7, T8 a8, T9 a9, T10 a10) { typedef const wxFormatString
& TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get()); } template<typename T1, typename T2
, typename T3, typename T4, typename T5, typename T6, typename
T7, typename T8, typename T9, typename T10, typename T11>
int sprintf(const wxFormatString& f1, T1 a1, T2 a2, T3 a3
, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11)
{ typedef const wxFormatString& TF1; const wxFormatString
*fmt = ((wxFormatStringArgumentFinder<TF1>::find(f1)))
; return DoPrintfWchar(f1, wxArgNormalizerWchar<T1>(a1,
fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt, 2).get
(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(), wxArgNormalizerWchar
<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar<T5>(
a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(a6, fmt, 6)
.get(), wxArgNormalizerWchar<T7>(a7, fmt, 7).get(), wxArgNormalizerWchar
<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar<T9>(
a9, fmt, 9).get(), wxArgNormalizerWchar<T10>(a10, fmt, 10
).get(), wxArgNormalizerWchar<T11>(a11, fmt, 11).get())
; } template<typename T1, typename T2, typename T3, typename
T4, typename T5, typename T6, typename T7, typename T8, typename
T9, typename T10, typename T11, typename T12> int sprintf
(const wxFormatString& f1, T1 a1, T2 a2, T3 a3, T4 a4, T5
a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12) {
typedef const wxFormatString& TF1; const wxFormatString *
fmt = ((wxFormatStringArgumentFinder<TF1>::find(f1))); return
DoPrintfWchar(f1, wxArgNormalizerWchar<T1>(a1, fmt, 1)
.get(), wxArgNormalizerWchar<T2>(a2, fmt, 2).get(), wxArgNormalizerWchar
<T3>(a3, fmt, 3).get(), wxArgNormalizerWchar<T4>(
a4, fmt, 4).get(), wxArgNormalizerWchar<T5>(a5, fmt, 5)
.get(), wxArgNormalizerWchar<T6>(a6, fmt, 6).get(), wxArgNormalizerWchar
<T7>(a7, fmt, 7).get(), wxArgNormalizerWchar<T8>(
a8, fmt, 8).get(), wxArgNormalizerWchar<T9>(a9, fmt, 9)
.get(), wxArgNormalizerWchar<T10>(a10, fmt, 10).get(), wxArgNormalizerWchar
<T11>(a11, fmt, 11).get(), wxArgNormalizerWchar<T12>
(a12, fmt, 12).get()); } template<typename T1, typename T2
, typename T3, typename T4, typename T5, typename T6, typename
T7, typename T8, typename T9, typename T10, typename T11, typename
T12, typename T13> int sprintf(const wxFormatString& f1
, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9
, T10 a10, T11 a11, T12 a12, T13 a13) { typedef const wxFormatString
& TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get()); } template
<typename T1, typename T2, typename T3, typename T4, typename
T5, typename T6, typename T7, typename T8, typename T9, typename
T10, typename T11, typename T12, typename T13, typename T14>
int sprintf(const wxFormatString& f1, T1 a1, T2 a2, T3 a3
, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11,
T12 a12, T13 a13, T14 a14) { typedef const wxFormatString&
TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get()); } template<typename T1, typename
T2, typename T3, typename T4, typename T5, typename T6, typename
T7, typename T8, typename T9, typename T10, typename T11, typename
T12, typename T13, typename T14, typename T15> int sprintf
(const wxFormatString& f1, T1 a1, T2 a2, T3 a3, T4 a4, T5
a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12 a12, T13
a13, T14 a14, T15 a15) { typedef const wxFormatString& TF1
; const wxFormatString *fmt = ((wxFormatStringArgumentFinder<
TF1>::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>
(a15, fmt, 15).get()); } template<typename T1, typename T2
, typename T3, typename T4, typename T5, typename T6, typename
T7, typename T8, typename T9, typename T10, typename T11, typename
T12, typename T13, typename T14, typename T15, typename T16>
int sprintf(const wxFormatString& f1, T1 a1, T2 a2, T3 a3
, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11,
T12 a12, T13 a13, T14 a14, T15 a15, T16 a16) { typedef const
wxFormatString& TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>
(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt
, 16).get()); } template<typename T1, typename T2, typename
T3, typename T4, typename T5, typename T6, typename T7, typename
T8, typename T9, typename T10, typename T11, typename T12, typename
T13, typename T14, typename T15, typename T16, typename T17>
int sprintf(const wxFormatString& f1, T1 a1, T2 a2, T3 a3
, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11,
T12 a12, T13 a13, T14 a14, T15 a15, T16 a16, T17 a17) { typedef
const wxFormatString& TF1; const wxFormatString *fmt = (
(wxFormatStringArgumentFinder<TF1>::find(f1))); return DoPrintfWchar
(f1, wxArgNormalizerWchar<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar
<T2>(a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(
a3, fmt, 3).get(), wxArgNormalizerWchar<T4>(a4, fmt, 4)
.get(), wxArgNormalizerWchar<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar
<T6>(a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(
a7, fmt, 7).get(), wxArgNormalizerWchar<T8>(a8, fmt, 8)
.get(), wxArgNormalizerWchar<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar
<T10>(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>
(a11, fmt, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt
, 12).get(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get
(), wxArgNormalizerWchar<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar
<T15>(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>
(a16, fmt, 16).get(), wxArgNormalizerWchar<T17>(a17, fmt
, 17).get()); } template<typename T1, typename T2, typename
T3, typename T4, typename T5, typename T6, typename T7, typename
T8, typename T9, typename T10, typename T11, typename T12, typename
T13, typename T14, typename T15, typename T16, typename T17,
typename T18> int sprintf(const wxFormatString& f1, T1
a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10
a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16, T17
a17, T18 a18) { typedef const wxFormatString& TF1; const
wxFormatString *fmt = ((wxFormatStringArgumentFinder<TF1>
::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar<
T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt
, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(),
wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>
(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt
, 16).get(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get
(), wxArgNormalizerWchar<T18>(a18, fmt, 18).get()); } template
<typename T1, typename T2, typename T3, typename T4, typename
T5, typename T6, typename T7, typename T8, typename T9, typename
T10, typename T11, typename T12, typename T13, typename T14,
typename T15, typename T16, typename T17, typename T18, typename
T19> int sprintf(const wxFormatString& f1, T1 a1, T2 a2
, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11
a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16, T17 a17, T18
a18, T19 a19) { typedef const wxFormatString& TF1; const
wxFormatString *fmt = ((wxFormatStringArgumentFinder<TF1>
::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar<
T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt
, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(),
wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>
(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt
, 16).get(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get
(), wxArgNormalizerWchar<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar
<T19>(a19, fmt, 19).get()); } template<typename T1, typename
T2, typename T3, typename T4, typename T5, typename T6, typename
T7, typename T8, typename T9, typename T10, typename T11, typename
T12, typename T13, typename T14, typename T15, typename T16,
typename T17, typename T18, typename T19, typename T20> int
sprintf(const wxFormatString& f1, T1 a1, T2 a2, T3 a3, T4
a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11, T12
a12, T13 a13, T14 a14, T15 a15, T16 a16, T17 a17, T18 a18, T19
a19, T20 a20) { typedef const wxFormatString& TF1; const
wxFormatString *fmt = ((wxFormatStringArgumentFinder<TF1>
::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar<
T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt
, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(),
wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>
(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt
, 16).get(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get
(), wxArgNormalizerWchar<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar
<T19>(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>
(a20, fmt, 20).get()); } template<typename T1, typename T2
, typename T3, typename T4, typename T5, typename T6, typename
T7, typename T8, typename T9, typename T10, typename T11, typename
T12, typename T13, typename T14, typename T15, typename T16,
typename T17, typename T18, typename T19, typename T20, typename
T21> int sprintf(const wxFormatString& f1, T1 a1, T2 a2
, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11
a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16, T17 a17, T18
a18, T19 a19, T20 a20, T21 a21) { typedef const wxFormatString
& TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>
(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt
, 16).get(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get
(), wxArgNormalizerWchar<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar
<T19>(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>
(a20, fmt, 20).get(), wxArgNormalizerWchar<T21>(a21, fmt
, 21).get()); } template<typename T1, typename T2, typename
T3, typename T4, typename T5, typename T6, typename T7, typename
T8, typename T9, typename T10, typename T11, typename T12, typename
T13, typename T14, typename T15, typename T16, typename T17,
typename T18, typename T19, typename T20, typename T21, typename
T22> int sprintf(const wxFormatString& f1, T1 a1, T2 a2
, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11
a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16, T17 a17, T18
a18, T19 a19, T20 a20, T21 a21, T22 a22) { typedef const wxFormatString
& TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>
(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt
, 16).get(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get
(), wxArgNormalizerWchar<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar
<T19>(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>
(a20, fmt, 20).get(), wxArgNormalizerWchar<T21>(a21, fmt
, 21).get(), wxArgNormalizerWchar<T22>(a22, fmt, 22).get
()); } template<typename T1, typename T2, typename T3, typename
T4, typename T5, typename T6, typename T7, typename T8, typename
T9, typename T10, typename T11, typename T12, typename T13, typename
T14, typename T15, typename T16, typename T17, typename T18,
typename T19, typename T20, typename T21, typename T22, typename
T23> int sprintf(const wxFormatString& f1, T1 a1, T2 a2
, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11
a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16, T17 a17, T18
a18, T19 a19, T20 a20, T21 a21, T22 a22, T23 a23) { typedef const
wxFormatString& TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>
(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt
, 16).get(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get
(), wxArgNormalizerWchar<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar
<T19>(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>
(a20, fmt, 20).get(), wxArgNormalizerWchar<T21>(a21, fmt
, 21).get(), wxArgNormalizerWchar<T22>(a22, fmt, 22).get
(), wxArgNormalizerWchar<T23>(a23, fmt, 23).get()); } template
<typename T1, typename T2, typename T3, typename T4, typename
T5, typename T6, typename T7, typename T8, typename T9, typename
T10, typename T11, typename T12, typename T13, typename T14,
typename T15, typename T16, typename T17, typename T18, typename
T19, typename T20, typename T21, typename T22, typename T23,
typename T24> int sprintf(const wxFormatString& f1, T1
a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10
a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16, T17
a17, T18 a18, T19 a19, T20 a20, T21 a21, T22 a22, T23 a23, T24
a24) { typedef const wxFormatString& TF1; const wxFormatString
*fmt = ((wxFormatStringArgumentFinder<TF1>::find(f1)))
; return DoPrintfWchar(f1, wxArgNormalizerWchar<T1>(a1,
fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt, 2).get
(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(), wxArgNormalizerWchar
<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar<T5>(
a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(a6, fmt, 6)
.get(), wxArgNormalizerWchar<T7>(a7, fmt, 7).get(), wxArgNormalizerWchar
<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar<T9>(
a9, fmt, 9).get(), wxArgNormalizerWchar<T10>(a10, fmt, 10
).get(), wxArgNormalizerWchar<T11>(a11, fmt, 11).get(),
wxArgNormalizerWchar<T12>(a12, fmt, 12).get(), wxArgNormalizerWchar
<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar<T14>
(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>(a15, fmt
, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt, 16).get
(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get(), wxArgNormalizerWchar
<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar<T19>
(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>(a20, fmt
, 20).get(), wxArgNormalizerWchar<T21>(a21, fmt, 21).get
(), wxArgNormalizerWchar<T22>(a22, fmt, 22).get(), wxArgNormalizerWchar
<T23>(a23, fmt, 23).get(), wxArgNormalizerWchar<T24>
(a24, fmt, 24).get()); } template<typename T1, typename T2
, typename T3, typename T4, typename T5, typename T6, typename
T7, typename T8, typename T9, typename T10, typename T11, typename
T12, typename T13, typename T14, typename T15, typename T16,
typename T17, typename T18, typename T19, typename T20, typename
T21, typename T22, typename T23, typename T24, typename T25>
int sprintf(const wxFormatString& f1, T1 a1, T2 a2, T3 a3
, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11,
T12 a12, T13 a13, T14 a14, T15 a15, T16 a16, T17 a17, T18 a18
, T19 a19, T20 a20, T21 a21, T22 a22, T23 a23, T24 a24, T25 a25
) { typedef const wxFormatString& TF1; const wxFormatString
*fmt = ((wxFormatStringArgumentFinder<TF1>::find(f1)))
; return DoPrintfWchar(f1, wxArgNormalizerWchar<T1>(a1,
fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt, 2).get
(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(), wxArgNormalizerWchar
<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar<T5>(
a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(a6, fmt, 6)
.get(), wxArgNormalizerWchar<T7>(a7, fmt, 7).get(), wxArgNormalizerWchar
<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar<T9>(
a9, fmt, 9).get(), wxArgNormalizerWchar<T10>(a10, fmt, 10
).get(), wxArgNormalizerWchar<T11>(a11, fmt, 11).get(),
wxArgNormalizerWchar<T12>(a12, fmt, 12).get(), wxArgNormalizerWchar
<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar<T14>
(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>(a15, fmt
, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt, 16).get
(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get(), wxArgNormalizerWchar
<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar<T19>
(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>(a20, fmt
, 20).get(), wxArgNormalizerWchar<T21>(a21, fmt, 21).get
(), wxArgNormalizerWchar<T22>(a22, fmt, 22).get(), wxArgNormalizerWchar
<T23>(a23, fmt, 23).get(), wxArgNormalizerWchar<T24>
(a24, fmt, 24).get(), wxArgNormalizerWchar<T25>(a25, fmt
, 25).get()); } template<typename T1, typename T2, typename
T3, typename T4, typename T5, typename T6, typename T7, typename
T8, typename T9, typename T10, typename T11, typename T12, typename
T13, typename T14, typename T15, typename T16, typename T17,
typename T18, typename T19, typename T20, typename T21, typename
T22, typename T23, typename T24, typename T25, typename T26>
int sprintf(const wxFormatString& f1, T1 a1, T2 a2, T3 a3
, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11,
T12 a12, T13 a13, T14 a14, T15 a15, T16 a16, T17 a17, T18 a18
, T19 a19, T20 a20, T21 a21, T22 a22, T23 a23, T24 a24, T25 a25
, T26 a26) { typedef const wxFormatString& TF1; const wxFormatString
*fmt = ((wxFormatStringArgumentFinder<TF1>::find(f1)))
; return DoPrintfWchar(f1, wxArgNormalizerWchar<T1>(a1,
fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt, 2).get
(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(), wxArgNormalizerWchar
<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar<T5>(
a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(a6, fmt, 6)
.get(), wxArgNormalizerWchar<T7>(a7, fmt, 7).get(), wxArgNormalizerWchar
<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar<T9>(
a9, fmt, 9).get(), wxArgNormalizerWchar<T10>(a10, fmt, 10
).get(), wxArgNormalizerWchar<T11>(a11, fmt, 11).get(),
wxArgNormalizerWchar<T12>(a12, fmt, 12).get(), wxArgNormalizerWchar
<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar<T14>
(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>(a15, fmt
, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt, 16).get
(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get(), wxArgNormalizerWchar
<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar<T19>
(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>(a20, fmt
, 20).get(), wxArgNormalizerWchar<T21>(a21, fmt, 21).get
(), wxArgNormalizerWchar<T22>(a22, fmt, 22).get(), wxArgNormalizerWchar
<T23>(a23, fmt, 23).get(), wxArgNormalizerWchar<T24>
(a24, fmt, 24).get(), wxArgNormalizerWchar<T25>(a25, fmt
, 25).get(), wxArgNormalizerWchar<T26>(a26, fmt, 26).get
()); } template<typename T1, typename T2, typename T3, typename
T4, typename T5, typename T6, typename T7, typename T8, typename
T9, typename T10, typename T11, typename T12, typename T13, typename
T14, typename T15, typename T16, typename T17, typename T18,
typename T19, typename T20, typename T21, typename T22, typename
T23, typename T24, typename T25, typename T26, typename T27>
int sprintf(const wxFormatString& f1, T1 a1, T2 a2, T3 a3
, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10, T11 a11,
T12 a12, T13 a13, T14 a14, T15 a15, T16 a16, T17 a17, T18 a18
, T19 a19, T20 a20, T21 a21, T22 a22, T23 a23, T24 a24, T25 a25
, T26 a26, T27 a27) { typedef const wxFormatString& TF1; const
wxFormatString *fmt = ((wxFormatStringArgumentFinder<TF1>
::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar<
T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt
, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(),
wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>
(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt
, 16).get(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get
(), wxArgNormalizerWchar<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar
<T19>(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>
(a20, fmt, 20).get(), wxArgNormalizerWchar<T21>(a21, fmt
, 21).get(), wxArgNormalizerWchar<T22>(a22, fmt, 22).get
(), wxArgNormalizerWchar<T23>(a23, fmt, 23).get(), wxArgNormalizerWchar
<T24>(a24, fmt, 24).get(), wxArgNormalizerWchar<T25>
(a25, fmt, 25).get(), wxArgNormalizerWchar<T26>(a26, fmt
, 26).get(), wxArgNormalizerWchar<T27>(a27, fmt, 27).get
()); } template<typename T1, typename T2, typename T3, typename
T4, typename T5, typename T6, typename T7, typename T8, typename
T9, typename T10, typename T11, typename T12, typename T13, typename
T14, typename T15, typename T16, typename T17, typename T18,
typename T19, typename T20, typename T21, typename T22, typename
T23, typename T24, typename T25, typename T26, typename T27,
typename T28> int sprintf(const wxFormatString& f1, T1
a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10
a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16, T17
a17, T18 a18, T19 a19, T20 a20, T21 a21, T22 a22, T23 a23, T24
a24, T25 a25, T26 a26, T27 a27, T28 a28) { typedef const wxFormatString
& TF1; const wxFormatString *fmt = ((wxFormatStringArgumentFinder
<TF1>::find(f1))); return DoPrintfWchar(f1, wxArgNormalizerWchar
<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar<T2>(
a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(a3, fmt, 3)
.get(), wxArgNormalizerWchar<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar
<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(
a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(a7, fmt, 7)
.get(), wxArgNormalizerWchar<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar
<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar<T10>
(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>(a11, fmt
, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt, 12).get
(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar
<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>
(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt
, 16).get(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get
(), wxArgNormalizerWchar<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar
<T19>(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>
(a20, fmt, 20).get(), wxArgNormalizerWchar<T21>(a21, fmt
, 21).get(), wxArgNormalizerWchar<T22>(a22, fmt, 22).get
(), wxArgNormalizerWchar<T23>(a23, fmt, 23).get(), wxArgNormalizerWchar
<T24>(a24, fmt, 24).get(), wxArgNormalizerWchar<T25>
(a25, fmt, 25).get(), wxArgNormalizerWchar<T26>(a26, fmt
, 26).get(), wxArgNormalizerWchar<T27>(a27, fmt, 27).get
(), wxArgNormalizerWchar<T28>(a28, fmt, 28).get()); } template
<typename T1, typename T2, typename T3, typename T4, typename
T5, typename T6, typename T7, typename T8, typename T9, typename
T10, typename T11, typename T12, typename T13, typename T14,
typename T15, typename T16, typename T17, typename T18, typename
T19, typename T20, typename T21, typename T22, typename T23,
typename T24, typename T25, typename T26, typename T27, typename
T28, typename T29> int sprintf(const wxFormatString& f1
, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9
, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15, T16 a16
, T17 a17, T18 a18, T19 a19, T20 a20, T21 a21, T22 a22, T23 a23
, T24 a24, T25 a25, T26 a26, T27 a27, T28 a28, T29 a29) { typedef
const wxFormatString& TF1; const wxFormatString *fmt = (
(wxFormatStringArgumentFinder<TF1>::find(f1))); return DoPrintfWchar
(f1, wxArgNormalizerWchar<T1>(a1, fmt, 1).get(), wxArgNormalizerWchar
<T2>(a2, fmt, 2).get(), wxArgNormalizerWchar<T3>(
a3, fmt, 3).get(), wxArgNormalizerWchar<T4>(a4, fmt, 4)
.get(), wxArgNormalizerWchar<T5>(a5, fmt, 5).get(), wxArgNormalizerWchar
<T6>(a6, fmt, 6).get(), wxArgNormalizerWchar<T7>(
a7, fmt, 7).get(), wxArgNormalizerWchar<T8>(a8, fmt, 8)
.get(), wxArgNormalizerWchar<T9>(a9, fmt, 9).get(), wxArgNormalizerWchar
<T10>(a10, fmt, 10).get(), wxArgNormalizerWchar<T11>
(a11, fmt, 11).get(), wxArgNormalizerWchar<T12>(a12, fmt
, 12).get(), wxArgNormalizerWchar<T13>(a13, fmt, 13).get
(), wxArgNormalizerWchar<T14>(a14, fmt, 14).get(), wxArgNormalizerWchar
<T15>(a15, fmt, 15).get(), wxArgNormalizerWchar<T16>
(a16, fmt, 16).get(), wxArgNormalizerWchar<T17>(a17, fmt
, 17).get(), wxArgNormalizerWchar<T18>(a18, fmt, 18).get
(), wxArgNormalizerWchar<T19>(a19, fmt, 19).get(), wxArgNormalizerWchar
<T20>(a20, fmt, 20).get(), wxArgNormalizerWchar<T21>
(a21, fmt, 21).get(), wxArgNormalizerWchar<T22>(a22, fmt
, 22).get(), wxArgNormalizerWchar<T23>(a23, fmt, 23).get
(), wxArgNormalizerWchar<T24>(a24, fmt, 24).get(), wxArgNormalizerWchar
<T25>(a25, fmt, 25).get(), wxArgNormalizerWchar<T26>
(a26, fmt, 26).get(), wxArgNormalizerWchar<T27>(a27, fmt
, 27).get(), wxArgNormalizerWchar<T28>(a28, fmt, 28).get
(), wxArgNormalizerWchar<T29>(a29, fmt, 29).get()); } template
<typename T1, typename T2, typename T3, typename T4, typename
T5, typename T6, typename T7, typename T8, typename T9, typename
T10, typename T11, typename T12, typename T13, typename T14,
typename T15, typename T16, typename T17, typename T18, typename
T19, typename T20, typename T21, typename T22, typename T23,
typename T24, typename T25, typename T26, typename T27, typename
T28, typename T29, typename T30> int sprintf(const wxFormatString
& f1, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8
a8, T9 a9, T10 a10, T11 a11, T12 a12, T13 a13, T14 a14, T15 a15
, T16 a16, T17 a17, T18 a18, T19 a19, T20 a20, T21 a21, T22 a22
, T23 a23, T24 a24, T25 a25, T26 a26, T27 a27, T28 a28, T29 a29
, T30 a30) { typedef const wxFormatString& TF1; const wxFormatString
*fmt = ((wxFormatStringArgumentFinder<TF1>::find(f1)))
; return DoPrintfWchar(f1, wxArgNormalizerWchar<T1>(a1,
fmt, 1).get(), wxArgNormalizerWchar<T2>(a2, fmt, 2).get
(), wxArgNormalizerWchar<T3>(a3, fmt, 3).get(), wxArgNormalizerWchar
<T4>(a4, fmt, 4).get(), wxArgNormalizerWchar<T5>(
a5, fmt, 5).get(), wxArgNormalizerWchar<T6>(a6, fmt, 6)
.get(), wxArgNormalizerWchar<T7>(a7, fmt, 7).get(), wxArgNormalizerWchar
<T8>(a8, fmt, 8).get(), wxArgNormalizerWchar<T9>(
a9, fmt, 9).get(), wxArgNormalizerWchar<T10>(a10, fmt, 10
).get(), wxArgNormalizerWchar<T11>(a11, fmt, 11).get(),
wxArgNormalizerWchar<T12>(a12, fmt, 12).get(), wxArgNormalizerWchar
<T13>(a13, fmt, 13).get(), wxArgNormalizerWchar<T14>
(a14, fmt, 14).get(), wxArgNormalizerWchar<T15>(a15, fmt
, 15).get(), wxArgNormalizerWchar<T16>(a16, fmt, 16).get
(), wxArgNormalizerWchar<T17>(a17, fmt, 17).get(), wxArgNormalizerWchar
<T18>(a18, fmt, 18).get(), wxArgNormalizerWchar<T19>
(a19, fmt, 19).get(), wxArgNormalizerWchar<T20>(a20, fmt
, 20).get(), wxArgNormalizerWchar<T21>(a21, fmt, 21).get
(), wxArgNormalizerWchar<T22>(a22, fmt, 22).get(), wxArgNormalizerWchar
<T23>(a23, fmt, 23).get(), wxArgNormalizerWchar<T24>
(a24, fmt, 24).get(), wxArgNormalizerWchar<T25>(a25, fmt
, 25).get(), wxArgNormalizerWchar<T26>(a26, fmt, 26).get
(), wxArgNormalizerWchar<T27>(a27, fmt, 27).get(), wxArgNormalizerWchar
<T28>(a28, fmt, 28).get(), wxArgNormalizerWchar<T29>
(a29, fmt, 29).get(), wxArgNormalizerWchar<T30>(a30, fmt
, 30).get()); }
2466
2467 // use Cmp()
2468 int CompareTo(const wxChar* psz, caseCompare cmp = exact) const
2469 { return cmp == exact ? Cmp(psz) : CmpNoCase(psz); }
2470
2471 // use length()
2472 size_t Length() const { return length(); }
2473 // Count the number of characters
2474 int Freq(wxUniChar ch) const;
2475 // use MakeLower
2476 void LowerCase() { MakeLower(); }
2477 // use MakeUpper
2478 void UpperCase() { MakeUpper(); }
2479 // use Trim except that it doesn't change this string
2480 wxString Strip(stripType w = trailing) const;
2481
2482 // use Find (more general variants not yet supported)
2483 size_t Index(const wxChar* psz) const { return Find(psz); }
2484 size_t Index(wxUniChar ch) const { return Find(ch); }
2485 // use Truncate
2486 wxString& Remove(size_t pos) { return Truncate(pos); }
2487 wxString& RemoveLast(size_t n = 1) { return Truncate(length() - n); }
2488
2489 wxString& Remove(size_t nStart, size_t nLen)
2490 { return (wxString&)erase( nStart, nLen ); }
2491
2492 // use Find()
2493 int First( wxUniChar ch ) const { return Find(ch); }
2494 int First( wxUniCharRef ch ) const { return Find(ch); }
2495 int First( char ch ) const { return Find(ch); }
2496 int First( unsigned char ch ) const { return Find(ch); }
2497 int First( wchar_t ch ) const { return Find(ch); }
2498 int First( const wxString& str ) const { return Find(str); }
2499 int Last( wxUniChar ch ) const { return Find(ch, true); }
2500 bool Contains(const wxString& str) const { return Find(str) != wxNOT_FOUND(-1); }
2501
2502 // use empty()
2503 bool IsNull() const { return empty(); }
2504
2505 // std::string compatibility functions
2506
2507 // take nLen chars starting at nPos
2508 wxString(const wxString& str, size_t nPos, size_t nLen)
2509 { assign(str, nPos, nLen); }
2510 // take all characters from first to last
2511 wxString(const_iterator first, const_iterator last)
2512 : m_impl(first.impl(), last.impl()) { }
2513#if WXWIN_COMPATIBILITY_STRING_PTR_AS_ITER1
2514 // the 2 overloads below are for compatibility with the existing code using
2515 // pointers instead of iterators
2516#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
2517 wxString(const char *first, const char *last)
2518 {
2519 SubstrBufFromMB str(ImplStr(first, last - first));
2520 m_impl.assign(str.data, str.len);
2521 }
2522#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
2523 wxString(const wchar_t *first, const wchar_t *last)
2524 {
2525 SubstrBufFromWC str(ImplStr(first, last - first));
2526 m_impl.assign(str.data, str.len);
2527 }
2528 // and this one is needed to compile code adding offsets to c_str() result
2529 wxString(const wxCStrData& first, const wxCStrData& last)
2530 : m_impl(CreateConstIterator(first).impl(),
2531 CreateConstIterator(last).impl())
2532 {
2533 wxASSERT_MSG( first.m_str == last.m_str,do { if ( first.m_str == last.m_str ) { } else if ( wxTheAssertHandler
&& (wxOnAssert("/usr/include/wx-3.2/wx/string.h", 2534
, __FUNCTION__, "first.m_str == last.m_str", L"pointers must be into the same string"
), wxTrapInAssert) ) { wxTrapInAssert = false; asm volatile (
"int $3"); } } while ( (void)0, 0 )
2534 wxT("pointers must be into the same string") )do { if ( first.m_str == last.m_str ) { } else if ( wxTheAssertHandler
&& (wxOnAssert("/usr/include/wx-3.2/wx/string.h", 2534
, __FUNCTION__, "first.m_str == last.m_str", L"pointers must be into the same string"
), wxTrapInAssert) ) { wxTrapInAssert = false; asm volatile (
"int $3"); } } while ( (void)0, 0 )
;
2535 }
2536#endif // WXWIN_COMPATIBILITY_STRING_PTR_AS_ITER
2537
2538 // lib.string.modifiers
2539 // append elements str[pos], ..., str[pos+n]
2540 wxString& append(const wxString& str, size_t pos, size_t n)
2541 {
2542 wxSTRING_UPDATE_CACHED_LENGTH(n);
2543
2544 size_t from, len;
2545 str.PosLenToImpl(pos, n, &from, &len);
2546 m_impl.append(str.m_impl, from, len);
2547 return *this;
2548 }
2549 // append a string
2550 wxString& append(const wxString& str)
2551 {
2552 wxSTRING_UPDATE_CACHED_LENGTH(str.length());
2553
2554 m_impl.append(str.m_impl);
2555 return *this;
2556 }
2557
2558 // append first n (or all if n == npos) characters of sz
2559#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
2560 wxString& append(const char *sz)
2561 {
2562 wxSTRING_INVALIDATE_CACHED_LENGTH();
2563
2564 m_impl.append(ImplStr(sz));
2565 return *this;
2566 }
2567#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
2568
2569 wxString& append(const wchar_t *sz)
2570 {
2571 wxSTRING_INVALIDATE_CACHED_LENGTH();
2572
2573 m_impl.append(ImplStr(sz));
2574 return *this;
2575 }
2576
2577#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
2578 wxString& append(const char *sz, size_t n)
2579 {
2580 wxSTRING_INVALIDATE_CACHED_LENGTH();
2581
2582 SubstrBufFromMB str(ImplStr(sz, n));
2583 m_impl.append(str.data, str.len);
2584 return *this;
2585 }
2586#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
2587 wxString& append(const wchar_t *sz, size_t n)
2588 {
2589 wxSTRING_UPDATE_CACHED_LENGTH(n);
2590
2591 SubstrBufFromWC str(ImplStr(sz, n));
2592 m_impl.append(str.data, str.len);
2593 return *this;
2594 }
2595
2596 wxString& append(const wxCStrData& str)
2597 { return append(str.AsString()); }
2598#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
2599 wxString& append(const wxScopedCharBuffer& str)
2600 { return append(str.data(), str.length()); }
2601#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
2602 wxString& append(const wxScopedWCharBuffer& str)
2603 { return append(str.data(), str.length()); }
2604 wxString& append(const wxCStrData& str, size_t n)
2605 { return append(str.AsString(), 0, n); }
2606#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
2607 wxString& append(const wxScopedCharBuffer& str, size_t n)
2608 { return append(str.data(), n); }
2609#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
2610 wxString& append(const wxScopedWCharBuffer& str, size_t n)
2611 { return append(str.data(), n); }
2612
2613 // append n copies of ch
2614 wxString& append(size_t n, wxUniChar ch)
2615 {
2616 if ( wxStringOperations::IsSingleCodeUnitCharacter(ch) )
2617 {
2618 wxSTRING_UPDATE_CACHED_LENGTH(n);
2619
2620 m_impl.append(n, (wxStringCharType)ch);
2621 }
2622 else
2623 {
2624 wxSTRING_INVALIDATE_CACHED_LENGTH();
2625
2626 m_impl.append(wxStringOperations::EncodeNChars(n, ch));
2627 }
2628
2629 return *this;
2630 }
2631
2632 wxString& append(size_t n, wxUniCharRef ch)
2633 { return append(n, wxUniChar(ch)); }
2634 wxString& append(size_t n, char ch)
2635 { return append(n, wxUniChar(ch)); }
2636 wxString& append(size_t n, unsigned char ch)
2637 { return append(n, wxUniChar(ch)); }
2638 wxString& append(size_t n, wchar_t ch)
2639 { return append(n, wxUniChar(ch)); }
2640
2641 // append from first to last
2642 wxString& append(const_iterator first, const_iterator last)
2643 {
2644 wxSTRING_INVALIDATE_CACHED_LENGTH();
2645
2646 m_impl.append(first.impl(), last.impl());
2647 return *this;
2648 }
2649#if WXWIN_COMPATIBILITY_STRING_PTR_AS_ITER1
2650#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
2651 wxString& append(const char *first, const char *last)
2652 { return append(first, last - first); }
2653#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
2654 wxString& append(const wchar_t *first, const wchar_t *last)
2655 { return append(first, last - first); }
2656 wxString& append(const wxCStrData& first, const wxCStrData& last)
2657 { return append(CreateConstIterator(first), CreateConstIterator(last)); }
2658#endif // WXWIN_COMPATIBILITY_STRING_PTR_AS_ITER
2659
2660 // same as `this_string = str'
2661 wxString& assign(const wxString& str)
2662 {
2663 wxSTRING_SET_CACHED_LENGTH(str.length());
2664
2665 m_impl = str.m_impl;
2666
2667 return *this;
2668 }
2669
2670#ifdef wxHAS_RVALUE_REF
2671 wxString& assign(wxString&& str) wxNOEXCEPTnoexcept
2672 {
2673 #if wxUSE_STRING_POS_CACHE0
2674 wxSTRING_SET_CACHED_LENGTH(str.length());
2675 str.InvalidateCache();
2676 #endif
2677 m_impl = std::move(str.m_impl);
2678
2679 return *this;
2680 }
2681#endif
2682
2683 // This is a non-standard-compliant overload taking the first "len"
2684 // characters of the source string.
2685 wxString& assign(const wxString& str, size_t len)
2686 {
2687#if wxUSE_STRING_POS_CACHE0
2688 // It is legal to pass len > str.length() to wxStringImpl::assign() but
2689 // by restricting it here we save some work for that function so it's not
2690 // really less efficient and, at the same time, ensure that we don't
2691 // cache invalid length.
2692 const size_t lenSrc = str.length();
2693 if ( len > lenSrc )
2694 len = lenSrc;
2695
2696 wxSTRING_SET_CACHED_LENGTH(len);
2697#endif // wxUSE_STRING_POS_CACHE
2698
2699 m_impl.assign(str.m_impl, 0, str.LenToImpl(len));
2700
2701 return *this;
2702 }
2703
2704#ifdef wxHAS_RVALUE_REF
2705 wxString& assign(wxString&& str, size_t len)
2706 {
2707 str.Truncate(len);
2708 return assign(std::move(str));
2709 }
2710#endif
2711
2712 // same as ` = str[pos..pos + n]
2713 wxString& assign(const wxString& str, size_t pos, size_t n)
2714 {
2715 size_t from, len;
2716 str.PosLenToImpl(pos, n, &from, &len);
2717 m_impl.assign(str.m_impl, from, len);
2718
2719 // it's important to call this after PosLenToImpl() above in case str is
2720 // the same string as this one
2721 wxSTRING_SET_CACHED_LENGTH(n);
2722
2723 return *this;
2724 }
2725
2726 // same as `= first n (or all if n == npos) characters of sz'
2727#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
2728 wxString& assign(const char *sz)
2729 {
2730 wxSTRING_INVALIDATE_CACHE();
2731
2732 m_impl.assign(ImplStr(sz));
2733
2734 return *this;
2735 }
2736#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
2737
2738 wxString& assign(const wchar_t *sz)
2739 {
2740 wxSTRING_INVALIDATE_CACHE();
2741
2742 m_impl.assign(ImplStr(sz));
2743
2744 return *this;
2745 }
2746
2747#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
2748 wxString& assign(const char *sz, size_t n)
2749 {
2750 wxSTRING_INVALIDATE_CACHE();
2751
2752 SubstrBufFromMB str(ImplStr(sz, n));
2753 m_impl.assign(str.data, str.len);
2754
2755 return *this;
2756 }
2757#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
2758
2759 wxString& assign(const wchar_t *sz, size_t n)
2760 {
2761 wxSTRING_SET_CACHED_LENGTH(n);
2762
2763 SubstrBufFromWC str(ImplStr(sz, n));
2764 m_impl.assign(str.data, str.len);
2765
2766 return *this;
2767 }
2768
2769 wxString& assign(const wxCStrData& str)
2770 { return assign(str.AsString()); }
2771#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
2772 wxString& assign(const wxScopedCharBuffer& str)
2773 { return assign(str.data(), str.length()); }
2774#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
2775 wxString& assign(const wxScopedCharBuffer& buf, const wxMBConv& conv)
2776 {
2777 SubstrBufFromMB str(ImplStr(buf.data(), buf.length(), conv));
2778 m_impl.assign(str.data, str.len);
2779
2780 return *this;
2781 }
2782 wxString& assign(const wxScopedWCharBuffer& str)
2783 { return assign(str.data(), str.length()); }
2784 wxString& assign(const wxCStrData& str, size_t len)
2785 { return assign(str.AsString(), len); }
2786#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
2787 wxString& assign(const wxScopedCharBuffer& str, size_t len)
2788 { return assign(str.data(), len); }
2789#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
2790 wxString& assign(const wxScopedWCharBuffer& str, size_t len)
2791 { return assign(str.data(), len); }
2792
2793 // same as `= n copies of ch'
2794 wxString& assign(size_t n, wxUniChar ch)
2795 {
2796 wxSTRING_SET_CACHED_LENGTH(n);
2797
2798 if ( wxStringOperations::IsSingleCodeUnitCharacter(ch) )
2799 m_impl.assign(n, (wxStringCharType)ch);
2800 else
2801 m_impl.assign(wxStringOperations::EncodeNChars(n, ch));
2802
2803 return *this;
2804 }
2805
2806 wxString& assign(size_t n, wxUniCharRef ch)
2807 { return assign(n, wxUniChar(ch)); }
2808 wxString& assign(size_t n, char ch)
2809 { return assign(n, wxUniChar(ch)); }
2810 wxString& assign(size_t n, unsigned char ch)
2811 { return assign(n, wxUniChar(ch)); }
2812 wxString& assign(size_t n, wchar_t ch)
2813 { return assign(n, wxUniChar(ch)); }
2814
2815 // assign from first to last
2816 wxString& assign(const_iterator first, const_iterator last)
2817 {
2818 wxSTRING_INVALIDATE_CACHE();
2819
2820 m_impl.assign(first.impl(), last.impl());
2821
2822 return *this;
2823 }
2824#if WXWIN_COMPATIBILITY_STRING_PTR_AS_ITER1
2825#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
2826 wxString& assign(const char *first, const char *last)
2827 { return assign(first, last - first); }
2828#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
2829 wxString& assign(const wchar_t *first, const wchar_t *last)
2830 { return assign(first, last - first); }
2831 wxString& assign(const wxCStrData& first, const wxCStrData& last)
2832 { return assign(CreateConstIterator(first), CreateConstIterator(last)); }
2833#endif // WXWIN_COMPATIBILITY_STRING_PTR_AS_ITER
2834
2835 // string comparison
2836 int compare(const wxString& str) const;
2837#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
2838 int compare(const char* sz) const;
2839#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
2840 int compare(const wchar_t* sz) const;
2841 int compare(const wxCStrData& str) const
2842 { return compare(str.AsString()); }
2843#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
2844 int compare(const wxScopedCharBuffer& str) const
2845 { return compare(str.data()); }
2846#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
2847 int compare(const wxScopedWCharBuffer& str) const
2848 { return compare(str.data()); }
2849 // comparison with a substring
2850 int compare(size_t nStart, size_t nLen, const wxString& str) const;
2851 // comparison of 2 substrings
2852 int compare(size_t nStart, size_t nLen,
2853 const wxString& str, size_t nStart2, size_t nLen2) const;
2854 // substring comparison with first nCount characters of sz
2855#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
2856 int compare(size_t nStart, size_t nLen,
2857 const char* sz, size_t nCount = npos) const;
2858#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
2859 int compare(size_t nStart, size_t nLen,
2860 const wchar_t* sz, size_t nCount = npos) const;
2861
2862 // insert another string
2863 wxString& insert(size_t nPos, const wxString& str)
2864 { insert(GetIterForNthChar(nPos), str.begin(), str.end()); return *this; }
2865 // insert n chars of str starting at nStart (in str)
2866 wxString& insert(size_t nPos, const wxString& str, size_t nStart, size_t n)
2867 {
2868 wxSTRING_UPDATE_CACHED_LENGTH(n);
2869
2870 size_t from, len;
2871 str.PosLenToImpl(nStart, n, &from, &len);
2872 m_impl.insert(PosToImpl(nPos), str.m_impl, from, len);
2873
2874 return *this;
2875 }
2876
2877 // insert first n (or all if n == npos) characters of sz
2878#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
2879 wxString& insert(size_t nPos, const char *sz)
2880 {
2881 wxSTRING_INVALIDATE_CACHE();
2882
2883 m_impl.insert(PosToImpl(nPos), ImplStr(sz));
2884
2885 return *this;
2886 }
2887#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
2888
2889 wxString& insert(size_t nPos, const wchar_t *sz)
2890 {
2891 wxSTRING_INVALIDATE_CACHE();
2892
2893 m_impl.insert(PosToImpl(nPos), ImplStr(sz)); return *this;
2894 }
2895
2896#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
2897 wxString& insert(size_t nPos, const char *sz, size_t n)
2898 {
2899 wxSTRING_UPDATE_CACHED_LENGTH(n);
2900
2901 SubstrBufFromMB str(ImplStr(sz, n));
2902 m_impl.insert(PosToImpl(nPos), str.data, str.len);
2903
2904 return *this;
2905 }
2906#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
2907
2908 wxString& insert(size_t nPos, const wchar_t *sz, size_t n)
2909 {
2910 wxSTRING_UPDATE_CACHED_LENGTH(n);
2911
2912 SubstrBufFromWC str(ImplStr(sz, n));
2913 m_impl.insert(PosToImpl(nPos), str.data, str.len);
2914
2915 return *this;
2916 }
2917
2918 // insert n copies of ch
2919 wxString& insert(size_t nPos, size_t n, wxUniChar ch)
2920 {
2921 wxSTRING_UPDATE_CACHED_LENGTH(n);
2922
2923 if ( wxStringOperations::IsSingleCodeUnitCharacter(ch) )
2924 m_impl.insert(PosToImpl(nPos), n, (wxStringCharType)ch);
2925 else
2926 m_impl.insert(PosToImpl(nPos), wxStringOperations::EncodeNChars(n, ch));
2927
2928 return *this;
2929 }
2930
2931 iterator insert(iterator it, wxUniChar ch)
2932 {
2933 wxSTRING_UPDATE_CACHED_LENGTH(1);
2934
2935 if ( wxStringOperations::IsSingleCodeUnitCharacter(ch) )
2936 return iterator(this, m_impl.insert(it.impl(), (wxStringCharType)ch));
2937 else
2938 {
2939 size_t pos = IterToImplPos(it);
2940 m_impl.insert(pos, wxStringOperations::EncodeChar(ch));
2941 return iterator(this, m_impl.begin() + pos);
2942 }
2943 }
2944
2945 void insert(iterator it, const_iterator first, const_iterator last)
2946 {
2947 wxSTRING_INVALIDATE_CACHE();
2948
2949 m_impl.insert(it.impl(), first.impl(), last.impl());
2950 }
2951
2952#if WXWIN_COMPATIBILITY_STRING_PTR_AS_ITER1
2953#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
2954 void insert(iterator it, const char *first, const char *last)
2955 { insert(it - begin(), first, last - first); }
2956#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
2957 void insert(iterator it, const wchar_t *first, const wchar_t *last)
2958 { insert(it - begin(), first, last - first); }
2959 void insert(iterator it, const wxCStrData& first, const wxCStrData& last)
2960 { insert(it, CreateConstIterator(first), CreateConstIterator(last)); }
2961#endif // WXWIN_COMPATIBILITY_STRING_PTR_AS_ITER
2962
2963 void insert(iterator it, size_type n, wxUniChar ch)
2964 {
2965 wxSTRING_UPDATE_CACHED_LENGTH(n);
2966
2967 if ( wxStringOperations::IsSingleCodeUnitCharacter(ch) )
2968 m_impl.insert(it.impl(), n, (wxStringCharType)ch);
2969 else
2970 m_impl.insert(IterToImplPos(it), wxStringOperations::EncodeNChars(n, ch));
2971 }
2972
2973 // delete characters from nStart to nStart + nLen
2974 wxString& erase(size_type pos = 0, size_type n = npos)
2975 {
2976 wxSTRING_INVALIDATE_CACHE();
2977
2978 size_t from, len;
2979 PosLenToImpl(pos, n, &from, &len);
2980 m_impl.erase(from, len);
2981
2982 return *this;
2983 }
2984
2985 // delete characters from first up to last
2986 iterator erase(iterator first, iterator last)
2987 {
2988 wxSTRING_INVALIDATE_CACHE();
2989
2990 return iterator(this, m_impl.erase(first.impl(), last.impl()));
2991 }
2992
2993 iterator erase(iterator first)
2994 {
2995 wxSTRING_UPDATE_CACHED_LENGTH(-1);
2996
2997 return iterator(this, m_impl.erase(first.impl()));
2998 }
2999
3000 void clear()
3001 {
3002 wxSTRING_SET_CACHED_LENGTH(0);
3003
3004 m_impl.clear();
3005 }
3006
3007 // replaces the substring of length nLen starting at nStart
3008#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
3009 wxString& replace(size_t nStart, size_t nLen, const char* sz)
3010 {
3011 wxSTRING_INVALIDATE_CACHE();
3012
3013 size_t from, len;
3014 PosLenToImpl(nStart, nLen, &from, &len);
3015 m_impl.replace(from, len, ImplStr(sz));
3016
3017 return *this;
3018 }
3019#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
3020
3021 wxString& replace(size_t nStart, size_t nLen, const wchar_t* sz)
3022 {
3023 wxSTRING_INVALIDATE_CACHE();
3024
3025 size_t from, len;
3026 PosLenToImpl(nStart, nLen, &from, &len);
3027 m_impl.replace(from, len, ImplStr(sz));
3028
3029 return *this;
3030 }
3031
3032 // replaces the substring of length nLen starting at nStart
3033 wxString& replace(size_t nStart, size_t nLen, const wxString& str)
3034 {
3035 wxSTRING_INVALIDATE_CACHE();
3036
3037 size_t from, len;
3038 PosLenToImpl(nStart, nLen, &from, &len);
3039 m_impl.replace(from, len, str.m_impl);
3040
3041 return *this;
3042 }
3043
3044 // replaces the substring with nCount copies of ch
3045 wxString& replace(size_t nStart, size_t nLen, size_t nCount, wxUniChar ch)
3046 {
3047 wxSTRING_INVALIDATE_CACHE();
3048
3049 size_t from, len;
3050 PosLenToImpl(nStart, nLen, &from, &len);
3051
3052 if ( wxStringOperations::IsSingleCodeUnitCharacter(ch) )
3053 m_impl.replace(from, len, nCount, (wxStringCharType)ch);
3054 else
3055 m_impl.replace(from, len, wxStringOperations::EncodeNChars(nCount, ch));
3056
3057 return *this;
3058 }
3059
3060 // replaces a substring with another substring
3061 wxString& replace(size_t nStart, size_t nLen,
3062 const wxString& str, size_t nStart2, size_t nLen2)
3063 {
3064 wxSTRING_INVALIDATE_CACHE();
3065
3066 size_t from, len;
3067 PosLenToImpl(nStart, nLen, &from, &len);
3068
3069 size_t from2, len2;
3070 str.PosLenToImpl(nStart2, nLen2, &from2, &len2);
3071
3072 m_impl.replace(from, len, str.m_impl, from2, len2);
3073
3074 return *this;
3075 }
3076
3077 // replaces the substring with first nCount chars of sz
3078#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
3079 wxString& replace(size_t nStart, size_t nLen,
3080 const char* sz, size_t nCount)
3081 {
3082 wxSTRING_INVALIDATE_CACHE();
3083
3084 size_t from, len;
3085 PosLenToImpl(nStart, nLen, &from, &len);
3086
3087 SubstrBufFromMB str(ImplStr(sz, nCount));
3088
3089 m_impl.replace(from, len, str.data, str.len);
3090
3091 return *this;
3092 }
3093#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
3094
3095 wxString& replace(size_t nStart, size_t nLen,
3096 const wchar_t* sz, size_t nCount)
3097 {
3098 wxSTRING_INVALIDATE_CACHE();
3099
3100 size_t from, len;
3101 PosLenToImpl(nStart, nLen, &from, &len);
3102
3103 SubstrBufFromWC str(ImplStr(sz, nCount));
3104
3105 m_impl.replace(from, len, str.data, str.len);
3106
3107 return *this;
3108 }
3109
3110 wxString& replace(size_t nStart, size_t nLen,
3111 const wxString& s, size_t nCount)
3112 {
3113 wxSTRING_INVALIDATE_CACHE();
3114
3115 size_t from, len;
3116 PosLenToImpl(nStart, nLen, &from, &len);
3117 m_impl.replace(from, len, s.m_impl.c_str(), s.LenToImpl(nCount));
3118
3119 return *this;
3120 }
3121
3122#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
3123 wxString& replace(iterator first, iterator last, const char* s)
3124 {
3125 wxSTRING_INVALIDATE_CACHE();
3126
3127 m_impl.replace(first.impl(), last.impl(), ImplStr(s));
3128
3129 return *this;
3130 }
3131#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
3132
3133 wxString& replace(iterator first, iterator last, const wchar_t* s)
3134 {
3135 wxSTRING_INVALIDATE_CACHE();
3136
3137 m_impl.replace(first.impl(), last.impl(), ImplStr(s));
3138
3139 return *this;
3140 }
3141
3142#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
3143 wxString& replace(iterator first, iterator last, const char* s, size_type n)
3144 {
3145 wxSTRING_INVALIDATE_CACHE();
3146
3147 SubstrBufFromMB str(ImplStr(s, n));
3148 m_impl.replace(first.impl(), last.impl(), str.data, str.len);
3149
3150 return *this;
3151 }
3152#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
3153
3154 wxString& replace(iterator first, iterator last, const wchar_t* s, size_type n)
3155 {
3156 wxSTRING_INVALIDATE_CACHE();
3157
3158 SubstrBufFromWC str(ImplStr(s, n));
3159 m_impl.replace(first.impl(), last.impl(), str.data, str.len);
3160
3161 return *this;
3162 }
3163
3164 wxString& replace(iterator first, iterator last, const wxString& s)
3165 {
3166 wxSTRING_INVALIDATE_CACHE();
3167
3168 m_impl.replace(first.impl(), last.impl(), s.m_impl);
3169
3170 return *this;
3171 }
3172
3173 wxString& replace(iterator first, iterator last, size_type n, wxUniChar ch)
3174 {
3175 wxSTRING_INVALIDATE_CACHE();
3176
3177 if ( wxStringOperations::IsSingleCodeUnitCharacter(ch) )
3178 m_impl.replace(first.impl(), last.impl(), n, (wxStringCharType)ch);
3179 else
3180 m_impl.replace(first.impl(), last.impl(),
3181 wxStringOperations::EncodeNChars(n, ch));
3182
3183 return *this;
3184 }
3185
3186 wxString& replace(iterator first, iterator last,
3187 const_iterator first1, const_iterator last1)
3188 {
3189 wxSTRING_INVALIDATE_CACHE();
3190
3191 m_impl.replace(first.impl(), last.impl(), first1.impl(), last1.impl());
3192
3193 return *this;
3194 }
3195
3196#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
3197 wxString& replace(iterator first, iterator last,
3198 const char *first1, const char *last1)
3199 { replace(first, last, first1, last1 - first1); return *this; }
3200#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
3201 wxString& replace(iterator first, iterator last,
3202 const wchar_t *first1, const wchar_t *last1)
3203 { replace(first, last, first1, last1 - first1); return *this; }
3204
3205 // swap two strings
3206 void swap(wxString& str) wxNOEXCEPTnoexcept
3207 {
3208#if wxUSE_STRING_POS_CACHE0
3209 // we modify not only this string but also the other one directly so we
3210 // need to invalidate cache for both of them (we could also try to
3211 // exchange their cache entries but it seems unlikely to be worth it)
3212 InvalidateCache();
3213 str.InvalidateCache();
3214#endif // wxUSE_STRING_POS_CACHE
3215
3216 m_impl.swap(str.m_impl);
3217 }
3218
3219 // non-member swap for ADL
3220 friend void swap(wxString& s1, wxString& s2) wxNOEXCEPTnoexcept
3221 {
3222 s1.swap(s2);
3223 }
3224
3225 // find a substring
3226 size_t find(const wxString& str, size_t nStart = 0) const
3227 { return PosFromImpl(m_impl.find(str.m_impl, PosToImpl(nStart))); }
3228
3229 // find first n characters of sz
3230#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
3231 size_t find(const char* sz, size_t nStart = 0, size_t n = npos) const
3232 {
3233 SubstrBufFromMB str(ImplStr(sz, n));
3234 return PosFromImpl(m_impl.find(str.data, PosToImpl(nStart), str.len));
3235 }
3236#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
3237 size_t find(const wchar_t* sz, size_t nStart = 0, size_t n = npos) const
3238 {
3239 SubstrBufFromWC str(ImplStr(sz, n));
3240 return PosFromImpl(m_impl.find(str.data, PosToImpl(nStart), str.len));
3241 }
3242#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
3243 size_t find(const wxScopedCharBuffer& s, size_t nStart = 0, size_t n = npos) const
3244 { return find(s.data(), nStart, n); }
3245#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
3246 size_t find(const wxScopedWCharBuffer& s, size_t nStart = 0, size_t n = npos) const
3247 { return find(s.data(), nStart, n); }
3248 size_t find(const wxCStrData& s, size_t nStart = 0, size_t n = npos) const
3249 { return find(s.AsWChar(), nStart, n); }
3250
3251 // find the first occurrence of character ch after nStart
3252 size_t find(wxUniChar ch, size_t nStart = 0) const
3253 {
3254 if ( wxStringOperations::IsSingleCodeUnitCharacter(ch) )
3255 return PosFromImpl(m_impl.find((wxStringCharType)ch,
3256 PosToImpl(nStart)));
3257 else
3258 return PosFromImpl(m_impl.find(wxStringOperations::EncodeChar(ch),
3259 PosToImpl(nStart)));
3260 }
3261 size_t find(wxUniCharRef ch, size_t nStart = 0) const
3262 { return find(wxUniChar(ch), nStart); }
3263 size_t find(char ch, size_t nStart = 0) const
3264 { return find(wxUniChar(ch), nStart); }
3265 size_t find(unsigned char ch, size_t nStart = 0) const
3266 { return find(wxUniChar(ch), nStart); }
3267 size_t find(wchar_t ch, size_t nStart = 0) const
3268 { return find(wxUniChar(ch), nStart); }
3269
3270 // rfind() family is exactly like find() but works right to left
3271
3272 // as find, but from the end
3273 size_t rfind(const wxString& str, size_t nStart = npos) const
3274 { return PosFromImpl(m_impl.rfind(str.m_impl, PosToImpl(nStart))); }
3275
3276 // as find, but from the end
3277#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
3278 size_t rfind(const char* sz, size_t nStart = npos, size_t n = npos) const
3279 {
3280 SubstrBufFromMB str(ImplStr(sz, n));
3281 return PosFromImpl(m_impl.rfind(str.data, PosToImpl(nStart), str.len));
3282 }
3283#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
3284 size_t rfind(const wchar_t* sz, size_t nStart = npos, size_t n = npos) const
3285 {
3286 SubstrBufFromWC str(ImplStr(sz, n));
3287 return PosFromImpl(m_impl.rfind(str.data, PosToImpl(nStart), str.len));
3288 }
3289#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
3290 size_t rfind(const wxScopedCharBuffer& s, size_t nStart = npos, size_t n = npos) const
3291 { return rfind(s.data(), nStart, n); }
3292#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
3293 size_t rfind(const wxScopedWCharBuffer& s, size_t nStart = npos, size_t n = npos) const
3294 { return rfind(s.data(), nStart, n); }
3295 size_t rfind(const wxCStrData& s, size_t nStart = npos, size_t n = npos) const
3296 { return rfind(s.AsWChar(), nStart, n); }
3297 // as find, but from the end
3298 size_t rfind(wxUniChar ch, size_t nStart = npos) const
3299 {
3300 if ( wxStringOperations::IsSingleCodeUnitCharacter(ch) )
3301 return PosFromImpl(m_impl.rfind((wxStringCharType)ch,
3302 PosToImpl(nStart)));
3303 else
3304 return PosFromImpl(m_impl.rfind(wxStringOperations::EncodeChar(ch),
3305 PosToImpl(nStart)));
3306 }
3307 size_t rfind(wxUniCharRef ch, size_t nStart = npos) const
3308 { return rfind(wxUniChar(ch), nStart); }
3309 size_t rfind(char ch, size_t nStart = npos) const
3310 { return rfind(wxUniChar(ch), nStart); }
3311 size_t rfind(unsigned char ch, size_t nStart = npos) const
3312 { return rfind(wxUniChar(ch), nStart); }
3313 size_t rfind(wchar_t ch, size_t nStart = npos) const
3314 { return rfind(wxUniChar(ch), nStart); }
3315
3316 // find first/last occurrence of any character (not) in the set:
3317#if wxUSE_STL_BASED_WXSTRING1 && !wxUSE_UNICODE_UTF80
3318 // FIXME-UTF8: this is not entirely correct, because it doesn't work if
3319 // sizeof(wchar_t)==2 and surrogates are present in the string;
3320 // should we care? Probably not.
3321 size_t find_first_of(const wxString& str, size_t nStart = 0) const
3322 { return m_impl.find_first_of(str.m_impl, nStart); }
3323#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
3324 size_t find_first_of(const char* sz, size_t nStart = 0) const
3325 { return m_impl.find_first_of(ImplStr(sz), nStart); }
3326#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
3327 size_t find_first_of(const wchar_t* sz, size_t nStart = 0) const
3328 { return m_impl.find_first_of(ImplStr(sz), nStart); }
3329#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
3330 size_t find_first_of(const char* sz, size_t nStart, size_t n) const
3331 { return m_impl.find_first_of(ImplStr(sz), nStart, n); }
3332#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
3333 size_t find_first_of(const wchar_t* sz, size_t nStart, size_t n) const
3334 { return m_impl.find_first_of(ImplStr(sz), nStart, n); }
3335 size_t find_first_of(wxUniChar c, size_t nStart = 0) const
3336 { return m_impl.find_first_of((wxChar)c, nStart); }
3337
3338 size_t find_last_of(const wxString& str, size_t nStart = npos) const
3339 { return m_impl.find_last_of(str.m_impl, nStart); }
3340#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
3341 size_t find_last_of(const char* sz, size_t nStart = npos) const
3342 { return m_impl.find_last_of(ImplStr(sz), nStart); }
3343#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
3344 size_t find_last_of(const wchar_t* sz, size_t nStart = npos) const
3345 { return m_impl.find_last_of(ImplStr(sz), nStart); }
3346#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
3347 size_t find_last_of(const char* sz, size_t nStart, size_t n) const
3348 { return m_impl.find_last_of(ImplStr(sz), nStart, n); }
3349#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
3350 size_t find_last_of(const wchar_t* sz, size_t nStart, size_t n) const
3351 { return m_impl.find_last_of(ImplStr(sz), nStart, n); }
3352 size_t find_last_of(wxUniChar c, size_t nStart = npos) const
3353 { return m_impl.find_last_of((wxChar)c, nStart); }
3354
3355 size_t find_first_not_of(const wxString& str, size_t nStart = 0) const
3356 { return m_impl.find_first_not_of(str.m_impl, nStart); }
3357#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
3358 size_t find_first_not_of(const char* sz, size_t nStart = 0) const
3359 { return m_impl.find_first_not_of(ImplStr(sz), nStart); }
3360#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
3361 size_t find_first_not_of(const wchar_t* sz, size_t nStart = 0) const
3362 { return m_impl.find_first_not_of(ImplStr(sz), nStart); }
3363#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
3364 size_t find_first_not_of(const char* sz, size_t nStart, size_t n) const
3365 { return m_impl.find_first_not_of(ImplStr(sz), nStart, n); }
3366#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
3367 size_t find_first_not_of(const wchar_t* sz, size_t nStart, size_t n) const
3368 { return m_impl.find_first_not_of(ImplStr(sz), nStart, n); }
3369 size_t find_first_not_of(wxUniChar c, size_t nStart = 0) const
3370 { return m_impl.find_first_not_of((wxChar)c, nStart); }
3371
3372 size_t find_last_not_of(const wxString& str, size_t nStart = npos) const
3373 { return m_impl.find_last_not_of(str.m_impl, nStart); }
3374#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
3375 size_t find_last_not_of(const char* sz, size_t nStart = npos) const
3376 { return m_impl.find_last_not_of(ImplStr(sz), nStart); }
3377#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
3378 size_t find_last_not_of(const wchar_t* sz, size_t nStart = npos) const
3379 { return m_impl.find_last_not_of(ImplStr(sz), nStart); }
3380#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
3381 size_t find_last_not_of(const char* sz, size_t nStart, size_t n) const
3382 { return m_impl.find_last_not_of(ImplStr(sz), nStart, n); }
3383#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
3384 size_t find_last_not_of(const wchar_t* sz, size_t nStart, size_t n) const
3385 { return m_impl.find_last_not_of(ImplStr(sz), nStart, n); }
3386 size_t find_last_not_of(wxUniChar c, size_t nStart = npos) const
3387 { return m_impl.find_last_not_of((wxChar)c, nStart); }
3388#else
3389 // we can't use std::string implementation in UTF-8 build, because the
3390 // character sets would be interpreted wrongly:
3391
3392 // as strpbrk() but starts at nStart, returns npos if not found
3393 size_t find_first_of(const wxString& str, size_t nStart = 0) const
3394#if wxUSE_UNICODE1 // FIXME-UTF8: temporary
3395 { return find_first_of(str.wc_str(), nStart); }
3396#else
3397 { return find_first_of(str.mb_str(), nStart); }
3398#endif
3399 // same as above
3400#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
3401 size_t find_first_of(const char* sz, size_t nStart = 0) const;
3402#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
3403 size_t find_first_of(const wchar_t* sz, size_t nStart = 0) const;
3404#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
3405 size_t find_first_of(const char* sz, size_t nStart, size_t n) const;
3406#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
3407 size_t find_first_of(const wchar_t* sz, size_t nStart, size_t n) const;
3408 // same as find(char, size_t)
3409 size_t find_first_of(wxUniChar c, size_t nStart = 0) const
3410 { return find(c, nStart); }
3411 // find the last (starting from nStart) char from str in this string
3412 size_t find_last_of (const wxString& str, size_t nStart = npos) const
3413#if wxUSE_UNICODE1 // FIXME-UTF8: temporary
3414 { return find_last_of(str.wc_str(), nStart); }
3415#else
3416 { return find_last_of(str.mb_str(), nStart); }
3417#endif
3418 // same as above
3419#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
3420 size_t find_last_of (const char* sz, size_t nStart = npos) const;
3421#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
3422 size_t find_last_of (const wchar_t* sz, size_t nStart = npos) const;
3423#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
3424 size_t find_last_of(const char* sz, size_t nStart, size_t n) const;
3425#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
3426 size_t find_last_of(const wchar_t* sz, size_t nStart, size_t n) const;
3427 // same as above
3428 size_t find_last_of(wxUniChar c, size_t nStart = npos) const
3429 { return rfind(c, nStart); }
3430
3431 // find first/last occurrence of any character not in the set
3432
3433 // as strspn() (starting from nStart), returns npos on failure
3434 size_t find_first_not_of(const wxString& str, size_t nStart = 0) const
3435#if wxUSE_UNICODE1 // FIXME-UTF8: temporary
3436 { return find_first_not_of(str.wc_str(), nStart); }
3437#else
3438 { return find_first_not_of(str.mb_str(), nStart); }
3439#endif
3440 // same as above
3441#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
3442 size_t find_first_not_of(const char* sz, size_t nStart = 0) const;
3443#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
3444 size_t find_first_not_of(const wchar_t* sz, size_t nStart = 0) const;
3445#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
3446 size_t find_first_not_of(const char* sz, size_t nStart, size_t n) const;
3447#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
3448 size_t find_first_not_of(const wchar_t* sz, size_t nStart, size_t n) const;
3449 // same as above
3450 size_t find_first_not_of(wxUniChar ch, size_t nStart = 0) const;
3451 // as strcspn()
3452 size_t find_last_not_of(const wxString& str, size_t nStart = npos) const
3453#if wxUSE_UNICODE1 // FIXME-UTF8: temporary
3454 { return find_last_not_of(str.wc_str(), nStart); }
3455#else
3456 { return find_last_not_of(str.mb_str(), nStart); }
3457#endif
3458 // same as above
3459#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
3460 size_t find_last_not_of(const char* sz, size_t nStart = npos) const;
3461#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
3462 size_t find_last_not_of(const wchar_t* sz, size_t nStart = npos) const;
3463#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
3464 size_t find_last_not_of(const char* sz, size_t nStart, size_t n) const;
3465#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
3466 size_t find_last_not_of(const wchar_t* sz, size_t nStart, size_t n) const;
3467 // same as above
3468 size_t find_last_not_of(wxUniChar ch, size_t nStart = npos) const;
3469#endif // wxUSE_STL_BASED_WXSTRING && !wxUSE_UNICODE_UTF8 or not
3470
3471 // provide char/wchar_t/wxUniCharRef overloads for char-finding functions
3472 // above to resolve ambiguities:
3473 size_t find_first_of(wxUniCharRef ch, size_t nStart = 0) const
3474 { return find_first_of(wxUniChar(ch), nStart); }
3475 size_t find_first_of(char ch, size_t nStart = 0) const
3476 { return find_first_of(wxUniChar(ch), nStart); }
3477 size_t find_first_of(unsigned char ch, size_t nStart = 0) const
3478 { return find_first_of(wxUniChar(ch), nStart); }
3479 size_t find_first_of(wchar_t ch, size_t nStart = 0) const
3480 { return find_first_of(wxUniChar(ch), nStart); }
3481 size_t find_last_of(wxUniCharRef ch, size_t nStart = npos) const
3482 { return find_last_of(wxUniChar(ch), nStart); }
3483 size_t find_last_of(char ch, size_t nStart = npos) const
3484 { return find_last_of(wxUniChar(ch), nStart); }
3485 size_t find_last_of(unsigned char ch, size_t nStart = npos) const
3486 { return find_last_of(wxUniChar(ch), nStart); }
3487 size_t find_last_of(wchar_t ch, size_t nStart = npos) const
3488 { return find_last_of(wxUniChar(ch), nStart); }
3489 size_t find_first_not_of(wxUniCharRef ch, size_t nStart = 0) const
3490 { return find_first_not_of(wxUniChar(ch), nStart); }
3491 size_t find_first_not_of(char ch, size_t nStart = 0) const
3492 { return find_first_not_of(wxUniChar(ch), nStart); }
3493 size_t find_first_not_of(unsigned char ch, size_t nStart = 0) const
3494 { return find_first_not_of(wxUniChar(ch), nStart); }
3495 size_t find_first_not_of(wchar_t ch, size_t nStart = 0) const
3496 { return find_first_not_of(wxUniChar(ch), nStart); }
3497 size_t find_last_not_of(wxUniCharRef ch, size_t nStart = npos) const
3498 { return find_last_not_of(wxUniChar(ch), nStart); }
3499 size_t find_last_not_of(char ch, size_t nStart = npos) const
3500 { return find_last_not_of(wxUniChar(ch), nStart); }
3501 size_t find_last_not_of(unsigned char ch, size_t nStart = npos) const
3502 { return find_last_not_of(wxUniChar(ch), nStart); }
3503 size_t find_last_not_of(wchar_t ch, size_t nStart = npos) const
3504 { return find_last_not_of(wxUniChar(ch), nStart); }
3505
3506 // and additional overloads for the versions taking strings:
3507 size_t find_first_of(const wxCStrData& sz, size_t nStart = 0) const
3508 { return find_first_of(sz.AsString(), nStart); }
3509#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
3510 size_t find_first_of(const wxScopedCharBuffer& sz, size_t nStart = 0) const
3511 { return find_first_of(sz.data(), nStart); }
3512#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
3513 size_t find_first_of(const wxScopedWCharBuffer& sz, size_t nStart = 0) const
3514 { return find_first_of(sz.data(), nStart); }
3515 size_t find_first_of(const wxCStrData& sz, size_t nStart, size_t n) const
3516 { return find_first_of(sz.AsWChar(), nStart, n); }
3517#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
3518 size_t find_first_of(const wxScopedCharBuffer& sz, size_t nStart, size_t n) const
3519 { return find_first_of(sz.data(), nStart, n); }
3520#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
3521 size_t find_first_of(const wxScopedWCharBuffer& sz, size_t nStart, size_t n) const
3522 { return find_first_of(sz.data(), nStart, n); }
3523
3524 size_t find_last_of(const wxCStrData& sz, size_t nStart = 0) const
3525 { return find_last_of(sz.AsString(), nStart); }
3526#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
3527 size_t find_last_of(const wxScopedCharBuffer& sz, size_t nStart = 0) const
3528 { return find_last_of(sz.data(), nStart); }
3529#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
3530 size_t find_last_of(const wxScopedWCharBuffer& sz, size_t nStart = 0) const
3531 { return find_last_of(sz.data(), nStart); }
3532 size_t find_last_of(const wxCStrData& sz, size_t nStart, size_t n) const
3533 { return find_last_of(sz.AsWChar(), nStart, n); }
3534#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
3535 size_t find_last_of(const wxScopedCharBuffer& sz, size_t nStart, size_t n) const
3536 { return find_last_of(sz.data(), nStart, n); }
3537#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
3538 size_t find_last_of(const wxScopedWCharBuffer& sz, size_t nStart, size_t n) const
3539 { return find_last_of(sz.data(), nStart, n); }
3540
3541 size_t find_first_not_of(const wxCStrData& sz, size_t nStart = 0) const
3542 { return find_first_not_of(sz.AsString(), nStart); }
3543#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
3544 size_t find_first_not_of(const wxScopedCharBuffer& sz, size_t nStart = 0) const
3545 { return find_first_not_of(sz.data(), nStart); }
3546#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
3547 size_t find_first_not_of(const wxScopedWCharBuffer& sz, size_t nStart = 0) const
3548 { return find_first_not_of(sz.data(), nStart); }
3549 size_t find_first_not_of(const wxCStrData& sz, size_t nStart, size_t n) const
3550 { return find_first_not_of(sz.AsWChar(), nStart, n); }
3551#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
3552 size_t find_first_not_of(const wxScopedCharBuffer& sz, size_t nStart, size_t n) const
3553 { return find_first_not_of(sz.data(), nStart, n); }
3554#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
3555 size_t find_first_not_of(const wxScopedWCharBuffer& sz, size_t nStart, size_t n) const
3556 { return find_first_not_of(sz.data(), nStart, n); }
3557
3558 size_t find_last_not_of(const wxCStrData& sz, size_t nStart = 0) const
3559 { return find_last_not_of(sz.AsString(), nStart); }
3560#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
3561 size_t find_last_not_of(const wxScopedCharBuffer& sz, size_t nStart = 0) const
3562 { return find_last_not_of(sz.data(), nStart); }
3563#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
3564 size_t find_last_not_of(const wxScopedWCharBuffer& sz, size_t nStart = 0) const
3565 { return find_last_not_of(sz.data(), nStart); }
3566 size_t find_last_not_of(const wxCStrData& sz, size_t nStart, size_t n) const
3567 { return find_last_not_of(sz.AsWChar(), nStart, n); }
3568#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
3569 size_t find_last_not_of(const wxScopedCharBuffer& sz, size_t nStart, size_t n) const
3570 { return find_last_not_of(sz.data(), nStart, n); }
3571#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
3572 size_t find_last_not_of(const wxScopedWCharBuffer& sz, size_t nStart, size_t n) const
3573 { return find_last_not_of(sz.data(), nStart, n); }
3574
3575 bool starts_with(const wxString &str) const
3576 { return StartsWith(str); }
3577#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
3578 bool starts_with(const char *sz) const
3579 { return StartsWith(sz); }
3580#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
3581 bool starts_with(const wchar_t *sz) const
3582 { return StartsWith(sz); }
3583
3584 bool ends_with(const wxString &str) const
3585 { return EndsWith(str); }
3586#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
3587 bool ends_with(const char *sz) const
3588 { return EndsWith(sz); }
3589#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
3590 bool ends_with(const wchar_t *sz) const
3591 { return EndsWith(sz); }
3592
3593 // string += string
3594 wxString& operator+=(const wxString& s)
3595 {
3596 wxSTRING_INVALIDATE_CACHED_LENGTH();
3597
3598 m_impl += s.m_impl;
3599 return *this;
3600 }
3601 // string += C string
3602#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
3603 wxString& operator+=(const char *psz)
3604 {
3605 wxSTRING_INVALIDATE_CACHED_LENGTH();
3606
3607 m_impl += ImplStr(psz);
3608 return *this;
3609 }
3610#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
3611 wxString& operator+=(const wchar_t *pwz)
3612 {
3613 wxSTRING_INVALIDATE_CACHED_LENGTH();
3614
3615 m_impl += ImplStr(pwz);
3616 return *this;
3617 }
3618 wxString& operator+=(const wxCStrData& s)
3619 {
3620 wxSTRING_INVALIDATE_CACHED_LENGTH();
3621
3622 m_impl += s.AsString().m_impl;
3623 return *this;
3624 }
3625#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
3626 wxString& operator+=(const wxScopedCharBuffer& s)
3627 { return append(s); }
3628#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
3629 wxString& operator+=(const wxScopedWCharBuffer& s)
3630 { return append(s); }
3631 // string += char
3632 wxString& operator+=(wxUniChar ch)
3633 {
3634 wxSTRING_UPDATE_CACHED_LENGTH(1);
3635
3636 if ( wxStringOperations::IsSingleCodeUnitCharacter(ch) )
3637 m_impl += (wxStringCharType)ch;
3638 else
3639 m_impl += wxStringOperations::EncodeChar(ch);
3640
3641 return *this;
3642 }
3643 wxString& operator+=(wxUniCharRef ch) { return *this += wxUniChar(ch); }
3644 wxString& operator+=(int ch) { return *this += wxUniChar(ch); }
3645 wxString& operator+=(char ch) { return *this += wxUniChar(ch); }
3646 wxString& operator+=(unsigned char ch) { return *this += wxUniChar(ch); }
3647 wxString& operator+=(wchar_t ch) { return *this += wxUniChar(ch); }
3648
3649private:
3650#if !wxUSE_STL_BASED_WXSTRING1
3651 // helpers for wxStringBuffer and wxStringBufferLength
3652 wxStringCharType *DoGetWriteBuf(size_t nLen)
3653 {
3654 return m_impl.DoGetWriteBuf(nLen);
3655 }
3656
3657 void DoUngetWriteBuf()
3658 {
3659 wxSTRING_INVALIDATE_CACHE();
3660
3661 m_impl.DoUngetWriteBuf();
3662 }
3663
3664 void DoUngetWriteBuf(size_t nLen)
3665 {
3666 wxSTRING_INVALIDATE_CACHE();
3667
3668 m_impl.DoUngetWriteBuf(nLen);
3669 }
3670#endif // !wxUSE_STL_BASED_WXSTRING
3671
3672 #if !wxUSE_UTF8_LOCALE_ONLY0
3673 int DoPrintfWchar(const wxChar *format, ...);
3674 static wxString DoFormatWchar(const wxChar *format, ...);
3675 #endif
3676 #if wxUSE_UNICODE_UTF80
3677 int DoPrintfUtf8(const char *format, ...);
3678 static wxString DoFormatUtf8(const char *format, ...);
3679 #endif
3680
3681#if !wxUSE_STL_BASED_WXSTRING1
3682 // check string's data validity
3683 bool IsValid() const { return m_impl.GetStringData()->IsValid(); }
3684#endif
3685
3686private:
3687 wxStringImpl m_impl;
3688
3689 // buffers for compatibility conversion from (char*)c_str() and
3690 // (wchar_t*)c_str(): the pointers returned by these functions should remain
3691 // valid until the string itself is modified for compatibility with the
3692 // existing code and consistency with std::string::c_str() so returning a
3693 // temporary buffer won't do and we need to cache the conversion results
3694
3695 // TODO-UTF8: benchmark various approaches to keeping compatibility buffers
3696 template<typename T>
3697 struct ConvertedBuffer
3698 {
3699 // notice that there is no need to initialize m_len here as it's unused
3700 // as long as m_str is NULL
3701 ConvertedBuffer() : m_str(NULL__null), m_len(0) {}
3702 ~ConvertedBuffer()
3703 { free(m_str); }
3704
3705 bool Extend(size_t len)
3706 {
3707 // add extra 1 for the trailing NUL
3708 void * const str = realloc(m_str, sizeof(T)*(len + 1));
3709 if ( !str )
3710 return false;
3711
3712 m_str = static_cast<T *>(str);
3713 m_len = len;
3714
3715 return true;
3716 }
3717
3718 const wxScopedCharTypeBuffer<T> AsScopedBuffer() const
3719 {
3720 return wxScopedCharTypeBuffer<T>::CreateNonOwned(m_str, m_len);
3721 }
3722
3723 T *m_str; // pointer to the string data
3724 size_t m_len; // length, not size, i.e. in chars and without last NUL
3725 };
3726
3727
3728#if wxUSE_UNICODE1
3729 // common mb_str() and wxCStrData::AsChar() helper: performs the conversion
3730 // and returns either m_convertedToChar.m_str (in which case its m_len is
3731 // also updated) or NULL if it failed
3732 //
3733 // there is an important exception: in wxUSE_UNICODE_UTF8 build if conv is a
3734 // UTF-8 one, we return m_impl.c_str() directly, without doing any conversion
3735 // as optimization and so the caller needs to check for this before using
3736 // m_convertedToChar
3737 //
3738 // NB: AsChar() returns char* in any build, unlike mb_str()
3739 const char *AsChar(const wxMBConv& conv) const;
3740
3741 // mb_str() implementation helper
3742 wxScopedCharBuffer AsCharBuf(const wxMBConv& conv) const
3743 {
3744#if wxUSE_UNICODE_UTF80
3745 // avoid conversion if we can
3746 if ( conv.IsUTF8() )
3747 {
3748 return wxScopedCharBuffer::CreateNonOwned(m_impl.c_str(),
3749 m_impl.length());
3750 }
3751#endif // wxUSE_UNICODE_UTF8
3752
3753 // call this solely in order to fill in m_convertedToChar as AsChar()
3754 // updates it as a side effect: this is a bit ugly but it's a completely
3755 // internal function so the users of this class shouldn't care or know
3756 // about it and doing it like this, i.e. having a separate AsChar(),
3757 // allows us to avoid the creation and destruction of a temporary buffer
3758 // when using wxCStrData without duplicating any code
3759 if ( !AsChar(conv) )
3760 {
3761 // although it would be probably more correct to return NULL buffer
3762 // from here if the conversion fails, a lot of existing code doesn't
3763 // expect mb_str() (or wc_str()) to ever return NULL so return an
3764 // empty string otherwise to avoid crashes in it
3765 //
3766 // also, some existing code does check for the conversion success and
3767 // so asserting here would be bad too -- even if it does mean that
3768 // silently losing data is possible for badly written code
3769 return wxScopedCharBuffer::CreateNonOwned("", 0);
3770 }
3771
3772 return m_convertedToChar.AsScopedBuffer();
3773 }
3774
3775 ConvertedBuffer<char> m_convertedToChar;
3776#endif // !wxUSE_UNICODE
3777
3778#if !wxUSE_UNICODE_WCHAR1
3779 // common wc_str() and wxCStrData::AsWChar() helper for both UTF-8 and ANSI
3780 // builds: converts the string contents into m_convertedToWChar and returns
3781 // NULL if the conversion failed (this can only happen in ANSI build)
3782 //
3783 // NB: AsWChar() returns wchar_t* in any build, unlike wc_str()
3784 const wchar_t *AsWChar(const wxMBConv& conv) const;
3785
3786 // wc_str() implementation helper
3787 wxScopedWCharBuffer AsWCharBuf(const wxMBConv& conv) const
3788 {
3789 if ( !AsWChar(conv) )
3790 return wxScopedWCharBuffer::CreateNonOwned(L"", 0);
3791
3792 return m_convertedToWChar.AsScopedBuffer();
3793 }
3794
3795 ConvertedBuffer<wchar_t> m_convertedToWChar;
3796#endif // !wxUSE_UNICODE_WCHAR
3797
3798#if wxUSE_UNICODE_UTF80
3799 // FIXME-UTF8: (try to) move this elsewhere (TLS) or solve differently
3800 // assigning to character pointer to by wxString::iterator may
3801 // change the underlying wxStringImpl iterator, so we have to
3802 // keep track of all iterators and update them as necessary:
3803 struct wxStringIteratorNodeHead
3804 {
3805 wxStringIteratorNodeHead() : ptr(NULL__null) {}
3806 wxStringIteratorNode *ptr;
3807
3808 // copying is disallowed as it would result in more than one pointer into
3809 // the same linked list
3810 wxDECLARE_NO_COPY_CLASS(wxStringIteratorNodeHead)private: wxStringIteratorNodeHead(const wxStringIteratorNodeHead
&) = delete; wxStringIteratorNodeHead& operator=(const
wxStringIteratorNodeHead&) = delete
;
3811 };
3812
3813 wxStringIteratorNodeHead m_iterators;
3814
3815 friend class WXDLLIMPEXP_FWD_BASE wxStringIteratorNode;
3816 friend class WXDLLIMPEXP_FWD_BASE wxUniCharRef;
3817#endif // wxUSE_UNICODE_UTF8
3818
3819 friend class WXDLLIMPEXP_FWD_BASE wxCStrData;
3820 friend class wxStringInternalBuffer;
3821 friend class wxStringInternalBufferLength;
3822};
3823
3824// string iterator operators that satisfy STL Random Access Iterator
3825// requirements:
3826inline wxString::iterator operator+(ptrdiff_t n, wxString::iterator i)
3827 { return i + n; }
3828inline wxString::const_iterator operator+(ptrdiff_t n, wxString::const_iterator i)
3829 { return i + n; }
3830inline wxString::reverse_iterator operator+(ptrdiff_t n, wxString::reverse_iterator i)
3831 { return i + n; }
3832inline wxString::const_reverse_iterator operator+(ptrdiff_t n, wxString::const_reverse_iterator i)
3833 { return i + n; }
3834
3835// notice that even though for many compilers the friend declarations above are
3836// enough, from the point of view of C++ standard we must have the declarations
3837// here as friend ones are not injected in the enclosing namespace and without
3838// them the code fails to compile with conforming compilers such as xlC or g++4
3839wxString WXDLLIMPEXP_BASE__attribute__ ((visibility("default"))) operator+(const wxString& string1, const wxString& string2);
3840#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
3841wxString WXDLLIMPEXP_BASE__attribute__ ((visibility("default"))) operator+(const wxString& string, const char *psz);
3842#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
3843wxString WXDLLIMPEXP_BASE__attribute__ ((visibility("default"))) operator+(const wxString& string, const wchar_t *pwz);
3844#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
3845wxString WXDLLIMPEXP_BASE__attribute__ ((visibility("default"))) operator+(const char *psz, const wxString& string);
3846#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
3847wxString WXDLLIMPEXP_BASE__attribute__ ((visibility("default"))) operator+(const wchar_t *pwz, const wxString& string);
3848
3849wxString WXDLLIMPEXP_BASE__attribute__ ((visibility("default"))) operator+(const wxString& string, wxUniChar ch);
3850wxString WXDLLIMPEXP_BASE__attribute__ ((visibility("default"))) operator+(wxUniChar ch, const wxString& string);
3851
3852inline wxString operator+(const wxString& string, wxUniCharRef ch)
3853 { return string + (wxUniChar)ch; }
3854inline wxString operator+(const wxString& string, char ch)
3855 { return string + wxUniChar(ch); }
3856inline wxString operator+(const wxString& string, wchar_t ch)
3857 { return string + wxUniChar(ch); }
3858inline wxString operator+(wxUniCharRef ch, const wxString& string)
3859 { return (wxUniChar)ch + string; }
3860inline wxString operator+(char ch, const wxString& string)
3861 { return wxUniChar(ch) + string; }
3862inline wxString operator+(wchar_t ch, const wxString& string)
3863 { return wxUniChar(ch) + string; }
3864
3865
3866#define wxGetEmptyString()wxString() wxString()
3867
3868// ----------------------------------------------------------------------------
3869// helper functions which couldn't be defined inline
3870// ----------------------------------------------------------------------------
3871
3872namespace wxPrivate
3873{
3874
3875#if wxUSE_UNICODE_WCHAR1
3876
3877template <>
3878struct wxStringAsBufHelper<char>
3879{
3880 static wxScopedCharBuffer Get(const wxString& s, size_t *len)
3881 {
3882 wxScopedCharBuffer buf(s.mb_str(wxConvUTF8wxGet_wxConvUTF8()));
3883 if ( len )
3884 *len = buf ? strlen(buf) : 0;
3885 return buf;
3886 }
3887};
3888
3889template <>
3890struct wxStringAsBufHelper<wchar_t>
3891{
3892 static wxScopedWCharBuffer Get(const wxString& s, size_t *len)
3893 {
3894 const size_t length = s.length();
3895 if ( len )
3896 *len = length;
3897 return wxScopedWCharBuffer::CreateNonOwned(s.wx_str(), length);
3898 }
3899};
3900
3901#elif wxUSE_UNICODE_UTF80
3902
3903template <>
3904struct wxStringAsBufHelper<char>
3905{
3906 static wxScopedCharBuffer Get(const wxString& s, size_t *len)
3907 {
3908 const size_t length = s.utf8_length();
3909 if ( len )
3910 *len = length;
3911 return wxScopedCharBuffer::CreateNonOwned(s.wx_str(), length);
3912 }
3913};
3914
3915template <>
3916struct wxStringAsBufHelper<wchar_t>
3917{
3918 static wxScopedWCharBuffer Get(const wxString& s, size_t *len)
3919 {
3920 wxScopedWCharBuffer wbuf(s.wc_str());
3921 if ( len )
3922 *len = wxWcslenwcslen(wbuf);
3923 return wbuf;
3924 }
3925};
3926
3927#endif // Unicode build kind
3928
3929} // namespace wxPrivate
3930
3931// ----------------------------------------------------------------------------
3932// wxStringBuffer: a tiny class allowing to get a writable pointer into string
3933// ----------------------------------------------------------------------------
3934
3935#if !wxUSE_STL_BASED_WXSTRING1
3936// string buffer for direct access to string data in their native
3937// representation:
3938class wxStringInternalBuffer
3939{
3940public:
3941 typedef wxStringCharType CharType;
3942
3943 wxStringInternalBuffer(wxString& str, size_t lenWanted = 1024)
3944 : m_str(str), m_buf(NULL__null)
3945 { m_buf = m_str.DoGetWriteBuf(lenWanted); }
3946
3947 ~wxStringInternalBuffer() { m_str.DoUngetWriteBuf(); }
3948
3949 operator wxStringCharType*() const { return m_buf; }
3950
3951private:
3952 wxString& m_str;
3953 wxStringCharType *m_buf;
3954
3955 wxDECLARE_NO_COPY_CLASS(wxStringInternalBuffer)private: wxStringInternalBuffer(const wxStringInternalBuffer&
) = delete; wxStringInternalBuffer& operator=(const wxStringInternalBuffer
&) = delete
;
3956};
3957
3958class wxStringInternalBufferLength
3959{
3960public:
3961 typedef wxStringCharType CharType;
3962
3963 wxStringInternalBufferLength(wxString& str, size_t lenWanted = 1024)
3964 : m_str(str), m_buf(NULL__null), m_len(0), m_lenSet(false)
3965 {
3966 m_buf = m_str.DoGetWriteBuf(lenWanted);
3967 wxASSERT(m_buf != NULL)do { if ( m_buf != __null ) { } else if ( wxTheAssertHandler &&
(wxOnAssert("/usr/include/wx-3.2/wx/string.h", 3967, __FUNCTION__
, "m_buf != __null", (const char*)__null), wxTrapInAssert) ) {
wxTrapInAssert = false; asm volatile ("int $3"); } } while (
(void)0, 0 )
;
3968 }
3969
3970 ~wxStringInternalBufferLength()
3971 {
3972 wxASSERT(m_lenSet)do { if ( m_lenSet ) { } else if ( wxTheAssertHandler &&
(wxOnAssert("/usr/include/wx-3.2/wx/string.h", 3972, __FUNCTION__
, "m_lenSet", (const char*)__null), wxTrapInAssert) ) { wxTrapInAssert
= false; asm volatile ("int $3"); } } while ( (void)0, 0 )
;
3973 m_str.DoUngetWriteBuf(m_len);
3974 }
3975
3976 operator wxStringCharType*() const { return m_buf; }
3977 void SetLength(size_t length) { m_len = length; m_lenSet = true; }
3978
3979private:
3980 wxString& m_str;
3981 wxStringCharType *m_buf;
3982 size_t m_len;
3983 bool m_lenSet;
3984
3985 wxDECLARE_NO_COPY_CLASS(wxStringInternalBufferLength)private: wxStringInternalBufferLength(const wxStringInternalBufferLength
&) = delete; wxStringInternalBufferLength& operator=(
const wxStringInternalBufferLength&) = delete
;
3986};
3987
3988#endif // !wxUSE_STL_BASED_WXSTRING
3989
3990template<typename T>
3991class wxStringTypeBufferBase
3992{
3993public:
3994 typedef T CharType;
3995
3996 wxStringTypeBufferBase(wxString& str, size_t lenWanted = 1024)
3997 : m_str(str), m_buf(lenWanted)
3998 {
3999 // for compatibility with old wxStringBuffer which provided direct
4000 // access to wxString internal buffer, initialize ourselves with the
4001 // string initial contents
4002
4003 size_t len;
4004 const wxCharTypeBuffer<CharType> buf(str.tchar_str<CharType>(&len));
4005 if ( buf )
4006 {
4007 if ( len > lenWanted )
4008 {
4009 // in this case there is not enough space for terminating NUL,
4010 // ensure that we still put it there
4011 m_buf.data()[lenWanted] = 0;
4012 len = lenWanted - 1;
4013 }
4014
4015 memcpy(m_buf.data(), buf, (len + 1)*sizeof(CharType));
4016 }
4017 //else: conversion failed, this can happen when trying to get Unicode
4018 // string contents into a char string
4019 }
4020
4021 operator CharType*() { return m_buf.data(); }
4022
4023protected:
4024 wxString& m_str;
4025 wxCharTypeBuffer<CharType> m_buf;
4026};
4027
4028template<typename T>
4029class wxStringTypeBufferLengthBase : public wxStringTypeBufferBase<T>
4030{
4031public:
4032 wxStringTypeBufferLengthBase(wxString& str, size_t lenWanted = 1024)
4033 : wxStringTypeBufferBase<T>(str, lenWanted),
4034 m_len(0),
4035 m_lenSet(false)
4036 { }
4037
4038 ~wxStringTypeBufferLengthBase()
4039 {
4040 wxASSERT_MSG( this->m_lenSet, "forgot to call SetLength()" )do { if ( this->m_lenSet ) { } else if ( wxTheAssertHandler
&& (wxOnAssert("/usr/include/wx-3.2/wx/string.h", 4040
, __FUNCTION__, "this->m_lenSet", "forgot to call SetLength()"
), wxTrapInAssert) ) { wxTrapInAssert = false; asm volatile (
"int $3"); } } while ( (void)0, 0 )
;
4041 }
4042
4043 void SetLength(size_t length) { m_len = length; m_lenSet = true; }
4044
4045protected:
4046 size_t m_len;
4047 bool m_lenSet;
4048};
4049
4050template<typename T>
4051class wxStringTypeBuffer : public wxStringTypeBufferBase<T>
4052{
4053public:
4054 wxStringTypeBuffer(wxString& str, size_t lenWanted = 1024)
4055 : wxStringTypeBufferBase<T>(str, lenWanted)
4056 { }
4057
4058 ~wxStringTypeBuffer()
4059 {
4060 this->m_str.assign(this->m_buf.data());
4061 }
4062
4063 wxDECLARE_NO_COPY_CLASS(wxStringTypeBuffer)private: wxStringTypeBuffer(const wxStringTypeBuffer&) = delete
; wxStringTypeBuffer& operator=(const wxStringTypeBuffer&
) = delete
;
4064};
4065
4066template<typename T>
4067class wxStringTypeBufferLength : public wxStringTypeBufferLengthBase<T>
4068{
4069public:
4070 wxStringTypeBufferLength(wxString& str, size_t lenWanted = 1024)
4071 : wxStringTypeBufferLengthBase<T>(str, lenWanted)
4072 { }
4073
4074 ~wxStringTypeBufferLength()
4075 {
4076 this->m_str.assign(this->m_buf.data(), this->m_len);
4077 }
4078
4079 wxDECLARE_NO_COPY_CLASS(wxStringTypeBufferLength)private: wxStringTypeBufferLength(const wxStringTypeBufferLength
&) = delete; wxStringTypeBufferLength& operator=(const
wxStringTypeBufferLength&) = delete
;
4080};
4081
4082#if wxUSE_STL_BASED_WXSTRING1
4083
4084class wxStringInternalBuffer : public wxStringTypeBufferBase<wxStringCharType>
4085{
4086public:
4087 wxStringInternalBuffer(wxString& str, size_t lenWanted = 1024)
4088 : wxStringTypeBufferBase<wxStringCharType>(str, lenWanted) {}
4089 ~wxStringInternalBuffer()
4090 { m_str.m_impl.assign(m_buf.data()); }
4091
4092 wxDECLARE_NO_COPY_CLASS(wxStringInternalBuffer)private: wxStringInternalBuffer(const wxStringInternalBuffer&
) = delete; wxStringInternalBuffer& operator=(const wxStringInternalBuffer
&) = delete
;
4093};
4094
4095class wxStringInternalBufferLength
4096 : public wxStringTypeBufferLengthBase<wxStringCharType>
4097{
4098public:
4099 wxStringInternalBufferLength(wxString& str, size_t lenWanted = 1024)
4100 : wxStringTypeBufferLengthBase<wxStringCharType>(str, lenWanted) {}
4101
4102 ~wxStringInternalBufferLength()
4103 {
4104 m_str.m_impl.assign(m_buf.data(), m_len);
4105 }
4106
4107 wxDECLARE_NO_COPY_CLASS(wxStringInternalBufferLength)private: wxStringInternalBufferLength(const wxStringInternalBufferLength
&) = delete; wxStringInternalBufferLength& operator=(
const wxStringInternalBufferLength&) = delete
;
4108};
4109
4110#endif // wxUSE_STL_BASED_WXSTRING
4111
4112
4113#if wxUSE_STL_BASED_WXSTRING1 || wxUSE_UNICODE_UTF80
4114typedef wxStringTypeBuffer<wxChar> wxStringBuffer;
4115typedef wxStringTypeBufferLength<wxChar> wxStringBufferLength;
4116#else // if !wxUSE_STL_BASED_WXSTRING && !wxUSE_UNICODE_UTF8
4117typedef wxStringInternalBuffer wxStringBuffer;
4118typedef wxStringInternalBufferLength wxStringBufferLength;
4119#endif // !wxUSE_STL_BASED_WXSTRING && !wxUSE_UNICODE_UTF8
4120
4121#if wxUSE_UNICODE_UTF80
4122typedef wxStringInternalBuffer wxUTF8StringBuffer;
4123typedef wxStringInternalBufferLength wxUTF8StringBufferLength;
4124#elif wxUSE_UNICODE_WCHAR1
4125
4126// Note about inlined dtors in the classes below: this is done not for
4127// performance reasons but just to avoid linking errors in the MSVC DLL build
4128// under Windows: if a class has non-inline methods it must be declared as
4129// being DLL-exported but, due to an extremely interesting feature of MSVC 7
4130// and later, any template class which is used as a base of a DLL-exported
4131// class is implicitly made DLL-exported too, as explained at the bottom of
4132// http://msdn.microsoft.com/en-us/library/twa2aw10.aspx (just to confirm: yes,
4133// _inheriting_ from a class can change whether it is being exported from DLL)
4134//
4135// But this results in link errors because the base template class is not DLL-
4136// exported, whether it is declared with WXDLLIMPEXP_BASE or not, because it
4137// does have only inline functions. So the simplest fix is to just make all the
4138// functions of these classes inline too.
4139
4140class wxUTF8StringBuffer : public wxStringTypeBufferBase<char>
4141{
4142public:
4143 wxUTF8StringBuffer(wxString& str, size_t lenWanted = 1024)
4144 : wxStringTypeBufferBase<char>(str, lenWanted) {}
4145 ~wxUTF8StringBuffer()
4146 {
4147 wxMBConvStrictUTF8 conv;
4148 size_t wlen = conv.ToWChar(NULL__null, 0, m_buf);
4149 wxCHECK_RET( wlen != wxCONV_FAILED, "invalid UTF-8 data in string buffer?" )if ( wlen != ((size_t)-1) ) {} else { do { if ( wxTheAssertHandler
&& (wxOnAssert("/usr/include/wx-3.2/wx/string.h", 4149
, __FUNCTION__, "\"wlen != ((size_t)-1)\"", "invalid UTF-8 data in string buffer?"
), wxTrapInAssert) ) { wxTrapInAssert = false; asm volatile (
"int $3"); } } while ( (void)0, 0 ); return; } struct wxDummyCheckStruct4149
;
4150
4151 wxStringInternalBuffer wbuf(m_str, wlen);
4152 conv.ToWChar(wbuf, wlen, m_buf);
4153 }
4154
4155 wxDECLARE_NO_COPY_CLASS(wxUTF8StringBuffer)private: wxUTF8StringBuffer(const wxUTF8StringBuffer&) = delete
; wxUTF8StringBuffer& operator=(const wxUTF8StringBuffer&
) = delete
;
4156};
4157
4158class wxUTF8StringBufferLength : public wxStringTypeBufferLengthBase<char>
4159{
4160public:
4161 wxUTF8StringBufferLength(wxString& str, size_t lenWanted = 1024)
4162 : wxStringTypeBufferLengthBase<char>(str, lenWanted) {}
4163 ~wxUTF8StringBufferLength()
4164 {
4165 wxCHECK_RET(m_lenSet, "length not set")if ( m_lenSet ) {} else { do { if ( wxTheAssertHandler &&
(wxOnAssert("/usr/include/wx-3.2/wx/string.h", 4165, __FUNCTION__
, "\"m_lenSet\"", "length not set"), wxTrapInAssert) ) { wxTrapInAssert
= false; asm volatile ("int $3"); } } while ( (void)0, 0 ); return
; } struct wxDummyCheckStruct4165
;
4166
4167 wxMBConvStrictUTF8 conv;
4168 size_t wlen = conv.ToWChar(NULL__null, 0, m_buf, m_len);
4169 wxCHECK_RET( wlen != wxCONV_FAILED, "invalid UTF-8 data in string buffer?" )if ( wlen != ((size_t)-1) ) {} else { do { if ( wxTheAssertHandler
&& (wxOnAssert("/usr/include/wx-3.2/wx/string.h", 4169
, __FUNCTION__, "\"wlen != ((size_t)-1)\"", "invalid UTF-8 data in string buffer?"
), wxTrapInAssert) ) { wxTrapInAssert = false; asm volatile (
"int $3"); } } while ( (void)0, 0 ); return; } struct wxDummyCheckStruct4169
;
4170
4171 wxStringInternalBufferLength wbuf(m_str, wlen);
4172 conv.ToWChar(wbuf, wlen, m_buf, m_len);
4173 wbuf.SetLength(wlen);
4174 }
4175
4176 wxDECLARE_NO_COPY_CLASS(wxUTF8StringBufferLength)private: wxUTF8StringBufferLength(const wxUTF8StringBufferLength
&) = delete; wxUTF8StringBufferLength& operator=(const
wxUTF8StringBufferLength&) = delete
;
4177};
4178#endif // wxUSE_UNICODE_UTF8/wxUSE_UNICODE_WCHAR
4179
4180
4181// ---------------------------------------------------------------------------
4182// wxString comparison functions: operator versions are always case sensitive
4183// ---------------------------------------------------------------------------
4184
4185// comparison with C-style narrow and wide strings.
4186#define wxCMP_WXCHAR_STRING(p, s, op) 0 op s.Cmp(p)
4187
4188wxDEFINE_ALL_COMPARISONS(const wchar_t *, const wxString&, wxCMP_WXCHAR_STRING)inline bool operator ==(const wchar_t * x, const wxString&
y) { return wxCMP_WXCHAR_STRING(x, y, ==); } inline bool operator
!=(const wchar_t * x, const wxString& y) { return wxCMP_WXCHAR_STRING
(x, y, !=); } inline bool operator >=(const wchar_t * x, const
wxString& y) { return wxCMP_WXCHAR_STRING(x, y, >=); }
inline bool operator <=(const wchar_t * x, const wxString
& y) { return wxCMP_WXCHAR_STRING(x, y, <=); } inline bool
operator >(const wchar_t * x, const wxString& y) { return
wxCMP_WXCHAR_STRING(x, y, >); } inline bool operator <
(const wchar_t * x, const wxString& y) { return wxCMP_WXCHAR_STRING
(x, y, <); } inline bool operator ==(const wxString& y
, const wchar_t * x) { return wxCMP_WXCHAR_STRING(x, y, ==); }
inline bool operator !=(const wxString& y, const wchar_t
* x) { return wxCMP_WXCHAR_STRING(x, y, !=); } inline bool operator
>=(const wxString& y, const wchar_t * x) { return wxCMP_WXCHAR_STRING
(x, y, <=); } inline bool operator <=(const wxString&
y, const wchar_t * x) { return wxCMP_WXCHAR_STRING(x, y, >=
); } inline bool operator >(const wxString& y, const wchar_t
* x) { return wxCMP_WXCHAR_STRING(x, y, <); } inline bool
operator <(const wxString& y, const wchar_t * x) { return
wxCMP_WXCHAR_STRING(x, y, >); }
4189#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
4190wxDEFINE_ALL_COMPARISONS(const char *, const wxString&, wxCMP_WXCHAR_STRING)inline bool operator ==(const char * x, const wxString& y
) { return wxCMP_WXCHAR_STRING(x, y, ==); } inline bool operator
!=(const char * x, const wxString& y) { return wxCMP_WXCHAR_STRING
(x, y, !=); } inline bool operator >=(const char * x, const
wxString& y) { return wxCMP_WXCHAR_STRING(x, y, >=); }
inline bool operator <=(const char * x, const wxString&
y) { return wxCMP_WXCHAR_STRING(x, y, <=); } inline bool operator
>(const char * x, const wxString& y) { return wxCMP_WXCHAR_STRING
(x, y, >); } inline bool operator <(const char * x, const
wxString& y) { return wxCMP_WXCHAR_STRING(x, y, <); }
inline bool operator ==(const wxString& y, const char * x
) { return wxCMP_WXCHAR_STRING(x, y, ==); } inline bool operator
!=(const wxString& y, const char * x) { return wxCMP_WXCHAR_STRING
(x, y, !=); } inline bool operator >=(const wxString& y
, const char * x) { return wxCMP_WXCHAR_STRING(x, y, <=); }
inline bool operator <=(const wxString& y, const char
* x) { return wxCMP_WXCHAR_STRING(x, y, >=); } inline bool
operator >(const wxString& y, const char * x) { return
wxCMP_WXCHAR_STRING(x, y, <); } inline bool operator <
(const wxString& y, const char * x) { return wxCMP_WXCHAR_STRING
(x, y, >); }
4191#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
4192
4193#undef wxCMP_WXCHAR_STRING
4194
4195inline bool operator==(const wxString& s1, const wxString& s2)
4196 { return s1.IsSameAs(s2); }
4197inline bool operator!=(const wxString& s1, const wxString& s2)
4198 { return !s1.IsSameAs(s2); }
4199inline bool operator< (const wxString& s1, const wxString& s2)
4200 { return s1.Cmp(s2) < 0; }
4201inline bool operator> (const wxString& s1, const wxString& s2)
4202 { return s1.Cmp(s2) > 0; }
4203inline bool operator<=(const wxString& s1, const wxString& s2)
4204 { return s1.Cmp(s2) <= 0; }
4205inline bool operator>=(const wxString& s1, const wxString& s2)
4206 { return s1.Cmp(s2) >= 0; }
4207
4208inline bool operator==(const wxString& s1, const wxCStrData& s2)
4209 { return s1 == s2.AsString(); }
4210inline bool operator==(const wxCStrData& s1, const wxString& s2)
4211 { return s1.AsString() == s2; }
4212inline bool operator!=(const wxString& s1, const wxCStrData& s2)
4213 { return s1 != s2.AsString(); }
4214inline bool operator!=(const wxCStrData& s1, const wxString& s2)
4215 { return s1.AsString() != s2; }
4216
4217inline bool operator==(const wxString& s1, const wxScopedWCharBuffer& s2)
4218 { return (s1.Cmp((const wchar_t *)s2) == 0); }
4219inline bool operator==(const wxScopedWCharBuffer& s1, const wxString& s2)
4220 { return (s2.Cmp((const wchar_t *)s1) == 0); }
4221inline bool operator!=(const wxString& s1, const wxScopedWCharBuffer& s2)
4222 { return (s1.Cmp((const wchar_t *)s2) != 0); }
4223inline bool operator!=(const wxScopedWCharBuffer& s1, const wxString& s2)
4224 { return (s2.Cmp((const wchar_t *)s1) != 0); }
4225
4226#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
4227inline bool operator==(const wxString& s1, const wxScopedCharBuffer& s2)
4228 { return (s1.Cmp((const char *)s2) == 0); }
4229inline bool operator==(const wxScopedCharBuffer& s1, const wxString& s2)
4230 { return (s2.Cmp((const char *)s1) == 0); }
4231inline bool operator!=(const wxString& s1, const wxScopedCharBuffer& s2)
4232 { return (s1.Cmp((const char *)s2) != 0); }
4233inline bool operator!=(const wxScopedCharBuffer& s1, const wxString& s2)
4234 { return (s2.Cmp((const char *)s1) != 0); }
4235#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
4236
4237inline wxString operator+(const wxString& string, const wxScopedWCharBuffer& buf)
4238 { return string + (const wchar_t *)buf; }
4239inline wxString operator+(const wxScopedWCharBuffer& buf, const wxString& string)
4240 { return (const wchar_t *)buf + string; }
4241
4242#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
4243inline wxString operator+(const wxString& string, const wxScopedCharBuffer& buf)
4244 { return string + (const char *)buf; }
4245inline wxString operator+(const wxScopedCharBuffer& buf, const wxString& string)
4246 { return (const char *)buf + string; }
4247#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
4248
4249// comparison with char
4250inline bool operator==(const wxUniChar& c, const wxString& s) { return s.IsSameAs(c); }
4251inline bool operator==(const wxUniCharRef& c, const wxString& s) { return s.IsSameAs(c); }
4252inline bool operator==(char c, const wxString& s) { return s.IsSameAs(c); }
4253inline bool operator==(wchar_t c, const wxString& s) { return s.IsSameAs(c); }
4254inline bool operator==(int c, const wxString& s) { return s.IsSameAs(c); }
4255inline bool operator==(const wxString& s, const wxUniChar& c) { return s.IsSameAs(c); }
4256inline bool operator==(const wxString& s, const wxUniCharRef& c) { return s.IsSameAs(c); }
4257inline bool operator==(const wxString& s, char c) { return s.IsSameAs(c); }
4258inline bool operator==(const wxString& s, wchar_t c) { return s.IsSameAs(c); }
4259inline bool operator!=(const wxUniChar& c, const wxString& s) { return !s.IsSameAs(c); }
4260inline bool operator!=(const wxUniCharRef& c, const wxString& s) { return !s.IsSameAs(c); }
4261inline bool operator!=(char c, const wxString& s) { return !s.IsSameAs(c); }
4262inline bool operator!=(wchar_t c, const wxString& s) { return !s.IsSameAs(c); }
4263inline bool operator!=(int c, const wxString& s) { return !s.IsSameAs(c); }
4264inline bool operator!=(const wxString& s, const wxUniChar& c) { return !s.IsSameAs(c); }
4265inline bool operator!=(const wxString& s, const wxUniCharRef& c) { return !s.IsSameAs(c); }
4266inline bool operator!=(const wxString& s, char c) { return !s.IsSameAs(c); }
4267inline bool operator!=(const wxString& s, wchar_t c) { return !s.IsSameAs(c); }
4268
4269
4270// wxString iterators comparisons
4271inline bool wxString::const_iterator::operator==(const iterator& i) const
4272 { return *this == const_iterator(i); }
4273inline bool wxString::const_iterator::operator!=(const iterator& i) const
4274 { return *this != const_iterator(i); }
4275inline bool wxString::const_iterator::operator<(const iterator& i) const
4276 { return *this < const_iterator(i); }
4277inline bool wxString::const_iterator::operator>(const iterator& i) const
4278 { return *this > const_iterator(i); }
4279inline bool wxString::const_iterator::operator<=(const iterator& i) const
4280 { return *this <= const_iterator(i); }
4281inline bool wxString::const_iterator::operator>=(const iterator& i) const
4282 { return *this >= const_iterator(i); }
4283
4284inline bool wxString::iterator::operator==(const const_iterator& i) const
4285 { return i == *this; }
4286inline bool wxString::iterator::operator!=(const const_iterator& i) const
4287 { return i != *this; }
4288inline bool wxString::iterator::operator<(const const_iterator& i) const
4289 { return i > *this; }
4290inline bool wxString::iterator::operator>(const const_iterator& i) const
4291 { return i < *this; }
4292inline bool wxString::iterator::operator<=(const const_iterator& i) const
4293 { return i >= *this; }
4294inline bool wxString::iterator::operator>=(const const_iterator& i) const
4295 { return i <= *this; }
4296
4297// we also need to provide the operators for comparison with wxCStrData to
4298// resolve ambiguity between operator(const wxChar *,const wxString &) and
4299// operator(const wxChar *, const wxChar *) for "p == s.c_str()"
4300//
4301// notice that these are (shallow) pointer comparisons, not (deep) string ones
4302#define wxCMP_CHAR_CSTRDATA(p, s, op) p op s.AsChar()
4303#define wxCMP_WCHAR_CSTRDATA(p, s, op) p op s.AsWChar()
4304
4305wxDEFINE_ALL_COMPARISONS(const wchar_t *, const wxCStrData&, wxCMP_WCHAR_CSTRDATA)inline bool operator ==(const wchar_t * x, const wxCStrData&
y) { return wxCMP_WCHAR_CSTRDATA(x, y, ==); } inline bool operator
!=(const wchar_t * x, const wxCStrData& y) { return wxCMP_WCHAR_CSTRDATA
(x, y, !=); } inline bool operator >=(const wchar_t * x, const
wxCStrData& y) { return wxCMP_WCHAR_CSTRDATA(x, y, >=
); } inline bool operator <=(const wchar_t * x, const wxCStrData
& y) { return wxCMP_WCHAR_CSTRDATA(x, y, <=); } inline
bool operator >(const wchar_t * x, const wxCStrData& y
) { return wxCMP_WCHAR_CSTRDATA(x, y, >); } inline bool operator
<(const wchar_t * x, const wxCStrData& y) { return wxCMP_WCHAR_CSTRDATA
(x, y, <); } inline bool operator ==(const wxCStrData&
y, const wchar_t * x) { return wxCMP_WCHAR_CSTRDATA(x, y, ==
); } inline bool operator !=(const wxCStrData& y, const wchar_t
* x) { return wxCMP_WCHAR_CSTRDATA(x, y, !=); } inline bool operator
>=(const wxCStrData& y, const wchar_t * x) { return wxCMP_WCHAR_CSTRDATA
(x, y, <=); } inline bool operator <=(const wxCStrData&
y, const wchar_t * x) { return wxCMP_WCHAR_CSTRDATA(x, y, >=
); } inline bool operator >(const wxCStrData& y, const
wchar_t * x) { return wxCMP_WCHAR_CSTRDATA(x, y, <); } inline
bool operator <(const wxCStrData& y, const wchar_t * x
) { return wxCMP_WCHAR_CSTRDATA(x, y, >); }
4306#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
4307wxDEFINE_ALL_COMPARISONS(const char *, const wxCStrData&, wxCMP_CHAR_CSTRDATA)inline bool operator ==(const char * x, const wxCStrData&
y) { return wxCMP_CHAR_CSTRDATA(x, y, ==); } inline bool operator
!=(const char * x, const wxCStrData& y) { return wxCMP_CHAR_CSTRDATA
(x, y, !=); } inline bool operator >=(const char * x, const
wxCStrData& y) { return wxCMP_CHAR_CSTRDATA(x, y, >=)
; } inline bool operator <=(const char * x, const wxCStrData
& y) { return wxCMP_CHAR_CSTRDATA(x, y, <=); } inline bool
operator >(const char * x, const wxCStrData& y) { return
wxCMP_CHAR_CSTRDATA(x, y, >); } inline bool operator <
(const char * x, const wxCStrData& y) { return wxCMP_CHAR_CSTRDATA
(x, y, <); } inline bool operator ==(const wxCStrData&
y, const char * x) { return wxCMP_CHAR_CSTRDATA(x, y, ==); }
inline bool operator !=(const wxCStrData& y, const char *
x) { return wxCMP_CHAR_CSTRDATA(x, y, !=); } inline bool operator
>=(const wxCStrData& y, const char * x) { return wxCMP_CHAR_CSTRDATA
(x, y, <=); } inline bool operator <=(const wxCStrData&
y, const char * x) { return wxCMP_CHAR_CSTRDATA(x, y, >=)
; } inline bool operator >(const wxCStrData& y, const char
* x) { return wxCMP_CHAR_CSTRDATA(x, y, <); } inline bool
operator <(const wxCStrData& y, const char * x) { return
wxCMP_CHAR_CSTRDATA(x, y, >); }
4308#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
4309
4310#undef wxCMP_CHAR_CSTRDATA
4311#undef wxCMP_WCHAR_CSTRDATA
4312
4313// ----------------------------------------------------------------------------
4314// Implement hashing using C++11 std::hash<>.
4315// ----------------------------------------------------------------------------
4316
4317#if __cplusplus201703L >= 201103L || wxCHECK_VISUALC_VERSION(10)0
4318
4319// Don't do this if ToStdWstring() is not available. We could work around it
4320// but, presumably, if using std::wstring is undesirable, then so is using
4321// std::hash<> anyhow.
4322#if wxUSE_STD_STRING1
4323
4324#include <functional>
4325
4326namespace std
4327{
4328 template<>
4329 struct hash<wxString>
4330 {
4331 size_t operator()(const wxString& s) const
4332 {
4333 return std::hash<std::wstring>()(s.ToStdWstring());
4334 }
4335 };
4336} // namespace std
4337
4338#endif // wxUSE_STD_STRING
4339
4340#endif // C++11
4341
4342// ---------------------------------------------------------------------------
4343// Implementation only from here until the end of file
4344// ---------------------------------------------------------------------------
4345
4346#if wxUSE_STD_IOSTREAM1
4347
4348#include "wx/iosfwrap.h"
4349
4350WXDLLIMPEXP_BASE__attribute__ ((visibility("default"))) wxSTDstd:: ostream& operator<<(wxSTDstd:: ostream&, const wxString&);
4351WXDLLIMPEXP_BASE__attribute__ ((visibility("default"))) wxSTDstd:: ostream& operator<<(wxSTDstd:: ostream&, const wxCStrData&);
4352#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
4353WXDLLIMPEXP_BASE__attribute__ ((visibility("default"))) wxSTDstd:: ostream& operator<<(wxSTDstd:: ostream&, const wxScopedCharBuffer&);
4354#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
4355WXDLLIMPEXP_BASE__attribute__ ((visibility("default"))) wxSTDstd:: ostream& operator<<(wxSTDstd:: ostream&, const wxScopedWCharBuffer&);
4356
4357#if wxUSE_UNICODE1 && defined(HAVE_WOSTREAM)
4358
4359WXDLLIMPEXP_BASE__attribute__ ((visibility("default"))) wxSTDstd:: wostream& operator<<(wxSTDstd:: wostream&, const wxString&);
4360WXDLLIMPEXP_BASE__attribute__ ((visibility("default"))) wxSTDstd:: wostream& operator<<(wxSTDstd:: wostream&, const wxCStrData&);
4361WXDLLIMPEXP_BASE__attribute__ ((visibility("default"))) wxSTDstd:: wostream& operator<<(wxSTDstd:: wostream&, const wxScopedWCharBuffer&);
4362
4363#endif // wxUSE_UNICODE && defined(HAVE_WOSTREAM)
4364
4365#endif // wxUSE_STD_IOSTREAM
4366
4367// ---------------------------------------------------------------------------
4368// wxCStrData implementation
4369// ---------------------------------------------------------------------------
4370
4371#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
4372inline wxCStrData::wxCStrData(char *buf)
4373 : m_str(new wxString(buf)), m_offset(0), m_owned(true) {}
4374#endif
4375inline wxCStrData::wxCStrData(wchar_t *buf)
4376 : m_str(new wxString(buf)), m_offset(0), m_owned(true) {}
4377
4378inline wxCStrData::wxCStrData(const wxCStrData& data)
4379 : m_str(data.m_owned ? new wxString(*data.m_str) : data.m_str),
4380 m_offset(data.m_offset),
4381 m_owned(data.m_owned)
4382{
4383}
4384
4385inline wxCStrData::~wxCStrData()
4386{
4387 if ( m_owned
6.1
Field 'm_owned' is true
6.1
Field 'm_owned' is true
)
2
Assuming field 'm_owned' is true
3
Taking true branch
7
Taking true branch
4388 delete const_cast<wxString*>(m_str); // cast to silence warnings
4
Memory is released
8
Attempt to delete released memory
4389}
4390
4391// AsChar() and AsWChar() implementations simply forward to wxString methods
4392
4393inline const wchar_t* wxCStrData::AsWChar() const
4394{
4395 const wchar_t * const p =
4396#if wxUSE_UNICODE_WCHAR1
4397 m_str->wc_str();
4398#elif wxUSE_UNICODE_UTF80
4399 m_str->AsWChar(wxMBConvStrictUTF8());
4400#else
4401 m_str->AsWChar(wxConvLibcwxGet_wxConvLibc());
4402#endif
4403
4404 // in Unicode build the string always has a valid Unicode representation
4405 // and even if a conversion is needed (as in UTF8 case) it can't fail
4406 //
4407 // but in ANSI build the string contents might be not convertible to
4408 // Unicode using the current locale encoding so we do need to check for
4409 // errors
4410#if !wxUSE_UNICODE1
4411 if ( !p )
4412 {
4413 // if conversion fails, return empty string and not NULL to avoid
4414 // crashes in code written with either wxWidgets 2 wxString or
4415 // std::string behaviour in mind: neither of them ever returns NULL
4416 // from its c_str() and so we shouldn't either
4417 //
4418 // notice that the same is done in AsChar() below and
4419 // wxString::wc_str() and mb_str() for the same reasons
4420 return L"";
4421 }
4422#endif // !wxUSE_UNICODE
4423
4424 return p + m_offset;
4425}
4426
4427#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
4428inline const char* wxCStrData::AsChar() const
4429{
4430#if wxUSE_UNICODE1 && !wxUSE_UTF8_LOCALE_ONLY0
4431 const char * const p = m_str->AsChar(wxConvLibcwxGet_wxConvLibc());
4432 if ( !p )
4433 return "";
4434#else // !wxUSE_UNICODE || wxUSE_UTF8_LOCALE_ONLY
4435 const char * const p = m_str->mb_str();
4436#endif // wxUSE_UNICODE && !wxUSE_UTF8_LOCALE_ONLY
4437
4438 return p + m_offset;
4439}
4440#endif
4441
4442inline wxString wxCStrData::AsString() const
4443{
4444 if ( m_offset == 0 )
4445 return *m_str;
4446 else
4447 return m_str->Mid(m_offset);
4448}
4449
4450inline const wxStringCharType *wxCStrData::AsInternal() const
4451{
4452#if wxUSE_UNICODE_UTF80
4453 return wxStringOperations::AddToIter(m_str->wx_str(), m_offset);
4454#else
4455 return m_str->wx_str() + m_offset;
4456#endif
4457}
4458
4459inline wxUniChar wxCStrData::operator*() const
4460{
4461 if ( m_str->empty() )
4462 return wxUniChar(wxT('\0')L'\0');
4463 else
4464 return (*m_str)[m_offset];
4465}
4466
4467inline wxUniChar wxCStrData::operator[](size_t n) const
4468{
4469 // NB: we intentionally use operator[] and not at() here because the former
4470 // works for the terminating NUL while the latter does not
4471 return (*m_str)[m_offset + n];
4472}
4473
4474// ----------------------------------------------------------------------------
4475// more wxCStrData operators
4476// ----------------------------------------------------------------------------
4477
4478#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
4479// we need to define those to allow "size_t pos = p - s.c_str()" where p is
4480// some pointer into the string
4481inline size_t operator-(const char *p, const wxCStrData& cs)
4482{
4483 return p - cs.AsChar();
4484}
4485#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
4486
4487inline size_t operator-(const wchar_t *p, const wxCStrData& cs)
4488{
4489 return p - cs.AsWChar();
4490}
4491
4492// ----------------------------------------------------------------------------
4493// implementation of wx[W]CharBuffer inline methods using wxCStrData
4494// ----------------------------------------------------------------------------
4495
4496#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
4497// FIXME-UTF8: move this to buffer.h
4498inline wxCharBuffer::wxCharBuffer(const wxCStrData& cstr)
4499 : wxCharTypeBufferBase(cstr.AsCharBuf())
4500{
4501}
4502#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
4503
4504inline wxWCharBuffer::wxWCharBuffer(const wxCStrData& cstr)
4505 : wxCharTypeBufferBase(cstr.AsWCharBuf())
4506{
4507}
4508
4509#if wxUSE_UNICODE_UTF80
4510// ----------------------------------------------------------------------------
4511// implementation of wxStringIteratorNode inline methods
4512// ----------------------------------------------------------------------------
4513
4514void wxStringIteratorNode::DoSet(const wxString *str,
4515 wxStringImpl::const_iterator *citer,
4516 wxStringImpl::iterator *iter)
4517{
4518 m_prev = NULL__null;
4519 m_iter = iter;
4520 m_citer = citer;
4521 m_str = str;
4522 if ( str )
4523 {
4524 m_next = str->m_iterators.ptr;
4525 const_cast<wxString*>(m_str)->m_iterators.ptr = this;
4526 if ( m_next )
4527 m_next->m_prev = this;
4528 }
4529 else
4530 {
4531 m_next = NULL__null;
4532 }
4533}
4534
4535void wxStringIteratorNode::clear()
4536{
4537 if ( m_next )
4538 m_next->m_prev = m_prev;
4539 if ( m_prev )
4540 m_prev->m_next = m_next;
4541 else if ( m_str ) // first in the list
4542 const_cast<wxString*>(m_str)->m_iterators.ptr = m_next;
4543
4544 m_next = m_prev = NULL__null;
4545 m_citer = NULL__null;
4546 m_iter = NULL__null;
4547 m_str = NULL__null;
4548}
4549#endif // wxUSE_UNICODE_UTF8
4550
4551#if WXWIN_COMPATIBILITY_2_80
4552 // lot of code out there doesn't explicitly include wx/crt.h, but uses
4553 // CRT wrappers that are now declared in wx/wxcrt.h and wx/wxcrtvararg.h,
4554 // so let's include this header now that wxString is defined and it's safe
4555 // to do it:
4556 #include "wx/crt.h"
4557#endif
4558
4559// ----------------------------------------------------------------------------
4560// Checks on wxString characters
4561// ----------------------------------------------------------------------------
4562
4563template<bool (T)(const wxUniChar& c)>
4564 inline bool wxStringCheck(const wxString& val)
4565 {
4566 for ( wxString::const_iterator i = val.begin();
4567 i != val.end();
4568 ++i )
4569 if (T(*i) == 0)
4570 return false;
4571 return true;
4572 }
4573
4574#endif // _WX_WXSTRING_H_