]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/wxstring.tex
GTK
[wxWidgets.git] / docs / latex / wx / wxstring.tex
1 \section{\class{wxString}}\label{wxstring}
2
3 \overview{Overview}{wxstringoverview}
4
5 \helpref{Member functions by category}{wxstringcategories}
6
7 {\bf CAVE:} The description of the memberfunctions is very
8 sparse in the moment. It will be extended in the next
9 version of the help file. The list of memberfunctions
10 is complete.
11
12 \membersection{wxString::wxString}\label{wxstringconstruct}
13
14 \func{void}{wxString}{\param{void}{}}\\
15 \func{void}{wxString}{\param{const wxString\&}{ x}}\\
16 \func{void}{wxString}{\param{const wxSubString\&}{ x}}\\
17 \func{void}{wxString}{\param{const char*}{ t}}\\
18 \func{void}{wxString}{\param{const char*}{ t}, \param{int}{ len}}\\
19 \func{void}{wxString}{\param{char}{ c}}
20
21 Constructors.
22
23 \membersection{wxString::\destruct{wxString}}\label{wxstringdestruct}
24
25 \func{void}{\destruct{wxString}}{\void}
26
27 String destructor.
28
29 \membersection{wxString::Alloc}\label{wxstringAlloc}
30
31 \func{void}{Alloc}{\param{int}{ newsize}}
32
33 Preallocate some space for wxString.
34
35 \membersection{wxString::Allocation}\label{wxstringAllocation}
36
37 \func{int}{Allocation}{\param{void}{}} \param{ const}{}
38
39 Report current allocation (not length!).
40
41 \membersection{wxString::Append}\label{wxstringAppend}
42
43 \func{wxString\&}{Append}{\param{const char*}{ cs}}\\
44 \func{wxString\&}{Append}{\param{const wxString\&}{ s}}
45
46 Concatenation.
47
48 \func{wxString\&}{Append}{\param{char}{ c}, \param{int}{ rep = 1}}
49
50 Append {\it c}, {\it rep} times
51
52 \membersection{wxString::After}\label{wxstringAfter}
53
54 \func{wxSubString}{After}{\param{int}{ pos}}\\
55 \func{wxSubString}{After}{\param{const wxString\&}{ x}, \param{int}{ startpos = 0}}\\
56 \func{wxSubString}{After}{\param{const wxSubString\&}{ x}, \param{int}{ startpos = 0}}\\
57 \func{wxSubString}{After}{\param{const char*}{ t}, \param{int}{ startpos = 0}}\\
58 \func{wxSubString}{After}{\param{char}{ c}, \param{int}{ startpos = 0}}\\
59 \func{wxSubString}{After}{\param{const wxRegex\&}{ r}, \param{int}{ startpos = 0}}
60
61 \membersection{wxString::At}\label{wxstringAt}
62
63 \func{wxSubString}{At}{\param{int}{ pos}, \param{int}{ len}}\\
64 \func{wxSubString}{operator ()}{\param{int}{ pos}, \param{int}{ len}}\\
65 \func{wxSubString}{At}{\param{const wxString\&}{ x}, \param{int}{ startpos = 0}}\\
66 \func{wxSubString}{At}{\param{const wxSubString\&}{ x}, \param{int}{ startpos = 0}}\\
67 \func{wxSubString}{At}{\param{const char*}{ t}, \param{int}{ startpos = 0}}\\
68 \func{wxSubString}{At}{\param{char}{ c}, \param{int}{ startpos = 0}}\\
69 \func{wxSubString}{At}{\param{const wxRegex\&}{ r}, \param{int}{ startpos = 0}}
70
71 wxSubString extraction.
72
73 Note that you can't take a substring of a const wxString, since
74 this leaves open the possiblility of indirectly modifying the
75 wxString through the wxSubString.
76
77 \membersection{wxString::Before}\label{wxstringBefore}
78
79 \func{wxSubString}{Before}{\param{int}{ pos}}\\
80 \func{wxSubString}{Before}{\param{const wxString\&}{ x}, \param{int}{ startpos = 0}}\\
81 \func{wxSubString}{Before}{\param{const wxSubString\&}{ x}, \param{int}{ startpos = 0}}\\
82 \func{wxSubString}{Before}{\param{const char*}{ t}, \param{int}{ startpos = 0}}\\
83 \func{wxSubString}{Before}{\param{char}{ c}, \param{int}{ startpos = 0}}\\
84 \func{wxSubString}{Before}{\param{const wxRegex\&}{ r}, \param{int}{ startpos = 0}}
85
86 \membersection{wxString::Capitalize}\label{wxstringCapitalize}
87
88 \func{void}{Capitalize}{\param{void}{}}\\
89 \func{friend wxString}{Capitalize}{\param{wxString\&}{ x}}
90
91 \membersection{wxString::Cat}\label{wxstringCat}
92
93 \func{friend void}{Cat}{\param{const wxString\&}{ a}, \param{const wxString\&}{ b}, \param{wxString\&}{ c}}\\
94 \func{friend void}{Cat}{\param{const wxString\&}{ a}, \param{const wxSubString\&}{ b}, \param{wxString\&}{ c}}\\
95 \func{friend void}{Cat}{\param{const wxString\&}{ a}, \param{const char*}{ b}, \param{wxString\&}{ c}}\\
96 \func{friend void}{Cat}{\param{const wxString\&}{ a}, \param{char}{ b}, \param{wxString\&}{ c}}\\
97 \func{friend void}{Cat}{\param{const wxSubString\&}{ a}, \param{const wxString\&}{ b}, \param{wxString\&}{ c}}\\
98 \func{friend void}{Cat}{\param{const wxSubString\&}{ a}, \param{const wxSubString\&}{ b}, \param{wxString\&}{ c}}\\
99 \func{friend void}{Cat}{\param{const wxSubString\&}{ a}, \param{const char*}{ b}, \param{wxString\&}{ c}}\\
100 \func{friend void}{Cat}{\param{const wxSubString\&}{ a}, \param{char}{ b}, \param{wxString\&}{ c}}\\
101 \func{friend void}{Cat}{\param{const char*}{ a}, \param{const wxString\&}{ b}, \param{wxString\&}{ c}}\\
102 \func{friend void}{Cat}{\param{const char*}{ a}, \param{const wxSubString\&}{ b}, \param{wxString\&}{ c}}\\
103 \func{friend void}{Cat}{\param{const char*}{ a}, \param{const char*}{ b}, \param{wxString\&}{ c}}\\
104 \func{friend void}{Cat}{\param{const char*}{ a}, \param{char}{ b}, \param{wxString\&}{ c}}
105
106 Concatenate first two arguments, store the result in the last argument.
107
108 \func{friend void}{Cat}{\param{const wxString\&}{ a}, \param{const wxString\&}{ b}, \param{const wxString\&}{ c}, \param{wxString\&}{ d}}\\
109 \func{friend void}{Cat}{\param{const wxString\&}{ a}, \param{const wxString\&}{ b}, \param{const wxSubString\&}{ c}, \param{wxString\&}{ d}}\\
110 \func{friend void}{Cat}{\param{const wxString\&}{ a}, \param{const wxString\&}{ b}, \param{const char*}{ c}, \param{wxString\&}{ d}}\\
111 \func{friend void}{Cat}{\param{const wxString\&}{ a}, \param{const wxString\&}{ b}, \param{char}{ c}, \param{wxString\&}{ d}}\\
112 \func{friend void}{Cat}{\param{const wxString\&}{ a}, \param{const wxSubString\&}{ b}, \param{const wxString\&}{ c}, \param{wxString\&}{ d}}\\
113 \func{friend void}{Cat}{\param{const wxString\&}{ a}, \param{const wxSubString\&}{ b}, \param{const wxSubString\&}{ c}, \param{wxString\&}{ d}}\\
114 \func{friend void}{Cat}{\param{const wxString\&}{ a}, \param{const wxSubString\&}{ b}, \param{const char*}{ c}, \param{wxString\&}{ d}}\\
115 \func{friend void}{Cat}{\param{const wxString\&}{ a}, \param{const wxSubString\&}{ b}, \param{char}{ c}, \param{wxString\&}{ d}}\\
116 \func{friend void}{Cat}{\param{const wxString\&}{ a}, \param{const char*}{ b}, \param{const wxString\&}{ c}, \param{wxString\&}{ d}}\\
117 \func{friend void}{Cat}{\param{const wxString\&}{ a}, \param{const char*}{ b}, \param{const wxSubString\&}{ c}, \param{wxString\&}{ d}}\\
118 \func{friend void}{Cat}{\param{const wxString\&}{ a}, \param{const char*}{ b}, \param{const char*}{ c}, \param{wxString\&}{ d}}\\
119 \func{friend void}{Cat}{\param{const wxString\&}{ a}, \param{const char*}{ b}, \param{char}{ c}, \param{wxString\&}{ d}}
120
121 \func{friend void}{Cat}{\param{const char*}{ a}, \param{const wxString\&}{ b}, \param{const wxString\&}{ c}, \param{wxString\&}{ d}}\\
122 \func{friend void}{Cat}{\param{const char*}{ a}, \param{const wxString\&}{ b}, \param{const wxSubString\&}{ c}, \param{wxString\&}{ d}}\\
123 \func{friend void}{Cat}{\param{const char*}{ a}, \param{const wxString\&}{ b}, \param{const char*}{ c}, \param{wxString\&}{ d}}\\
124 \func{friend void}{Cat}{\param{const char*}{ a}, \param{const wxString\&}{ b}, \param{char}{ c}, \param{wxString\&}{ d}}\\
125 \func{friend void}{Cat}{\param{const char*}{ a}, \param{const wxSubString\&}{ b}, \param{const wxString\&}{ c}, \param{wxString\&}{ d}}\\
126 \func{friend void}{Cat}{\param{const char*}{ a}, \param{const wxSubString\&}{ b}, \param{const wxSubString\&}{ c}, \param{wxString\&}{ d}}\\
127 \func{friend void}{Cat}{\param{const char*}{ a}, \param{const wxSubString\&}{ b}, \param{const char*}{ c}, \param{wxString\&}{ d}}\\
128 \func{friend void}{Cat}{\param{const char*}{ a}, \param{const wxSubString\&}{ b}, \param{char}{ c}, \param{wxString\&}{ d}}\\
129 \func{friend void}{Cat}{\param{const char*}{ a}, \param{const char*}{ b}, \param{const wxString\&}{ c}, \param{wxString\&}{ d}}\\
130 \func{friend void}{Cat}{\param{const char*}{ a}, \param{const char*}{ b}, \param{const wxSubString\&}{ c}, \param{wxString\&}{ d}}\\
131 \func{friend void}{Cat}{\param{const char*}{ a}, \param{const char*}{ b}, \param{const char*}{ c}, \param{wxString\&}{ d}}\\
132 \func{friend void}{Cat}{\param{const char*}{ a}, \param{const char*}{ b}, \param{char}{ c}, \param{wxString\&}{ d}}
133
134 Double concatenation, by request. (Yes, there are too many versions,
135 but if one is supported, then the others should be too).
136 Concatenate the first 3 args, store the result in the last argument.
137
138 \membersection{wxString::Chars}\label{wxstringChars}
139
140 \func{const char*}{Chars}{\param{void}{}} \param{ const}{}
141
142 Conversion.
143
144 \membersection{wxString::CompareTo}\label{wxstringCompareTo}
145
146 \begin{verbatim}
147 #define NO_POS ((int)(-1)) // undefined position
148 enum CaseCompare {exact, ignoreCase};
149 \end{verbatim}
150
151 \func{int}{CompareTo}{\param{const char*}{ cs}, \param{CaseCompare}{ cmp = exact}} \param{ const}{}\\
152 \func{int}{CompareTo}{\param{const wxString\&}{ cs}, \param{CaseCompare}{ cmp = exact}} \param{ const}{}
153
154 \membersection{wxString::Contains}\label{wxstringContains}
155
156 \func{bool}{Contains}{\param{char}{ c}} \param{ const}{}\\
157 \func{bool}{Contains}{\param{const wxString\&}{ y}} \param{ const}{}\\
158 \func{bool}{Contains}{\param{const wxSubString\&}{ y}} \param{ const}{}\\
159 \func{bool}{Contains}{\param{const char*}{ t}} \param{ const}{}\\
160 \func{bool}{Contains}{\param{const wxRegex\&}{ r}} \param{ const}{}
161
162 Return 1 if target appears anyhere in wxString; else 0.
163
164 \func{bool}{Contains}{\param{const char*}{ pat}, \param{CaseCompare}{ cmp}} \param{ const}{}\\
165 \func{bool}{Contains}{\param{const wxString\&}{ pat}, \param{CaseCompare}{ cmp}} \param{ const}{}
166
167 Case dependent/independent variation .
168
169 \func{bool}{Contains}{\param{char}{ c}, \param{int}{ pos}} \param{ const}{}\\
170 \func{bool}{Contains}{\param{const wxString\&}{ y}, \param{int}{ pos}} \param{ const}{}\\
171 \func{bool}{Contains}{\param{const wxSubString\&}{ y}, \param{int}{ pos}} \param{ const}{}\\
172 \func{bool}{Contains}{\param{const char*}{ t}, \param{int}{ pos}} \param{ const}{}\\
173 \func{bool}{Contains}{\param{const wxRegex\&}{ r}, \param{int}{ pos}} \param{ const}{}
174
175 Return 1 if the target appears anywhere after position {\it pos} (or
176 before, if {\it pos} is negative) in wxString; else 0.
177
178 \membersection{wxString::Copy}\label{wxstringCopy}
179
180 \func{wxString}{Copy}{\param{void}{}} \param{ const}{}
181
182 Duplication.
183
184 \membersection{wxString::Del}\label{wxstringDel}
185
186 \func{wxString\&}{Del}{\param{int}{ pos}, \param{int}{ len}}
187
188 Delete {\it len} characters starting at {\it pos}.
189
190 \func{wxString\&}{Del}{\param{const wxString\&}{ y}, \param{int}{ startpos = 0}}\\
191 \func{wxString\&}{Del}{\param{const wxSubString\&}{ y}, \param{int}{ startpos = 0}}\\
192 \func{wxString\&}{Del}{\param{const char*}{ t}, \param{int}{ startpos = 0}}\\
193 \func{wxString\&}{Del}{\param{char}{ c}, \param{int}{ startpos = 0}}\\
194 \func{wxString\&}{Del}{\param{const wxRegex\&}{ r}, \param{int}{ startpos = 0}}
195
196 Delete the first occurrence of target after {\it startpos}.
197
198 \membersection{wxString::DownCase}\label{wxstringDownCase}
199
200 \func{void}{Downcase}{\param{void}{}}\\
201 \func{friend wxString}{Downcase}{\param{wxString\&}{ x}}
202
203 \membersection{wxString::Elem}\label{wxstringElem}
204
205 \func{char}{Elem}{\param{int}{ i}} \param{ const}{}
206
207 Element extraction.
208
209 \membersection{wxString::Empty}\label{wxstringEmpty}
210
211 \func{int}{Empty}{\param{void}{}} \param{ const}{}
212
213 \membersection{wxString::Error}\label{wxstringError}
214
215 \func{void}{Error}{\param{const char*}{ msg}} \param{ const}{}
216
217 \membersection{wxString::First}\label{wxstringFirst}
218
219 \func{int}{First}{\param{char}{ c}} \param{ const}{}\\
220 \func{int}{First}{\param{const char*}{ cs}} \param{ const}{}\\
221 \func{int}{First}{\param{const wxString\&}{ cs}} \param{ const}{}
222
223 Return first or last occurrence of item.
224
225 \membersection{wxString::Firstchar}\label{wxstringFirstchar}
226 \func{char}{Firstchar}{\param{void}{}} \param{ const}{}
227
228 Element extraction.
229
230 \membersection{wxString::Freq}\label{wxstringFreq}
231
232 \func{int}{Freq}{\param{char}{ c}} \param{ const}{}\\
233 \func{int}{Freq}{\param{const wxString\&}{ y}} \param{ const}{}\\
234 \func{int}{Freq}{\param{const wxSubString\&}{ y}} \param{ const}{}\\
235 \func{int}{Freq}{\param{const char*}{ t}} \param{ const}{}
236
237 Return number of occurrences of target in wxString.
238
239 \membersection{wxString::From}\label{wxstringFrom}
240
241 \func{wxSubString}{From}{\param{int}{ pos}}\\
242 \func{wxSubString}{From}{\param{const wxString\&}{ x}, \param{int}{ startpos = 0}}\\
243 \func{wxSubString}{From}{\param{const wxSubString\&}{ x}, \param{int}{ startpos = 0}}\\
244 \func{wxSubString}{From}{\param{const char*}{ t}, \param{int}{ startpos = 0}}\\
245 \func{wxSubString}{From}{\param{char}{ c}, \param{int}{ startpos = 0}}\\
246 \func{wxSubString}{From}{\param{const wxRegex\&}{ r}, \param{int}{ startpos = 0}}
247
248 \membersection{wxString::GetData}\label{wxstringGetData}
249
250 \func{char*}{GetData}{\param{void}{}}
251
252 wxWindows compatibility conversion.
253
254 \membersection{wxString::GSub}\label{wxstringGSub}
255 \func{int}{GSub}{\param{const wxString\&}{ pat}, \param{const wxString\&}{ repl}}\\
256 \func{int}{GSub}{\param{const wxSubString\&}{ pat}, \param{const wxString\&}{ repl}}\\
257 \func{int}{GSub}{\param{const char*}{ pat}, \param{const wxString\&}{ repl}}\\
258 \func{int}{GSub}{\param{const char*}{ pat}, \param{const char*}{ repl}}\\
259 \func{int}{GSub}{\param{const wxRegex\&}{ pat}, \param{const wxString\&}{ repl}}
260
261 Global substitution: substitute all occurrences of {\it pat} with {\it repl},
262 returning the number of matches.
263
264 \membersection{wxString::Index}\label{wxstringIndex}
265
266 \func{int}{Index}{\param{char}{ c}, \param{int}{ startpos = 0}} \param{ const}{}\\
267 \func{int}{Index}{\param{const wxString\&}{ y}, \param{int}{ startpos = 0}} \param{ const}{}\\
268 \func{int}{Index}{\param{const wxString\&}{ y}, \param{int}{ startpos}, \param{CaseCompare}{ cmp}} \param{ const}{}\\
269 \func{int}{Index}{\param{const wxSubString\&}{ y}, \param{int}{ startpos = 0}} \param{ const}{}\\
270 \func{int}{Index}{\param{const char*}{ t}, \param{int}{ startpos = 0}} \param{ const}{}\\
271 \func{int}{Index}{\param{const char*}{ t}, \param{int}{ startpos}, \param{CaseCompare}{ cmp}} \param{ const}{}\\
272 \func{int}{Index}{\param{const wxRegex\&}{ r}, \param{int}{ startpos = 0}} \param{ const}{}
273
274 Return the position of target in string, or -1 for failure.
275
276 \membersection{wxString::Insert}\label{wxstringInsert}
277
278 \func{wxString\&}{Insert}{\param{int}{ pos}, \param{const char*}{ s}}\\
279 \func{wxString\&}{Insert}{\param{int}{ pos}, \param{const wxString\&}{ s}}
280
281 Insertion.
282
283 \membersection{wxString::IsAscii}\label{wxstringIsAscii}
284
285 \func{int}{IsAscii}{\param{void}{}} \param{ const}{}
286
287 Classification (should be capital, because of ctype.h macros).
288
289 \membersection{wxString::IsDefined}\label{wxstringIsDefined}
290
291 \func{int}{IsDefined}{\param{void}{}} \param{ const}{}
292
293 Classification (should be capital, because of ctype.h macros).
294
295 \membersection{wxString::IsNull}\label{wxstringIsNull}
296
297 \func{int}{IsNull}{\param{void}{}} \param{ const}{}
298
299 Classification (should be capital, because of ctype.h macros).
300
301 \membersection{wxString::IsNumber}\label{wxstringIsNumber}
302
303 \func{int}{IsNumber}{\param{void}{}} \param{ const}{}
304
305 Classification (should be capital, because of ctype.h macros).
306
307 \membersection{wxString::IsWord}\label{wxstringIsWord}
308
309 \func{int}{IsWord}{\param{void}{}} \param{ const}{}
310
311 Classification (should be capital, because of ctype.h macros).
312
313 \membersection{wxString::Last}\label{wxstringLast}
314
315 \func{int}{Last}{\param{char}{ c}} \param{ const}{}\\
316 \func{int}{Last}{\param{const char*}{ cs}} \param{ const}{}\\
317 \func{int}{Last}{\param{const wxString\&}{ cs}} \param{ const}{}
318
319 First or last occurrence of item.
320
321 \membersection{wxString::Lastchar}\label{wxstringLastchar}
322
323 \func{char}{Lastchar}{\param{void}{}} \param{ const}{}
324
325 Element extraction.
326
327 \membersection{wxString::Length}\label{wxstringLength}
328
329 \func{unsigned int}{Length}{\param{void}{}} \param{ const}{}
330
331 \membersection{wxString::LowerCase}\label{wxstringLowerCase}
332
333 \func{void}{LowerCase}{\param{void}{}}
334
335 \membersection{wxString::Matches}\label{wxstringMatches}
336
337 \func{bool}{Matches}{\param{char}{ c}, \param{int}{ pos = 0}} \param{ const}{}\\
338 \func{bool}{Matches}{\param{const wxString\&}{ y}, \param{int}{ pos = 0}} \param{ const}{}\\
339 \func{bool}{Matches}{\param{const wxSubString\&}{ y}, \param{int}{ pos = 0}} \param{ const}{}\\
340 \func{bool}{Matches}{\param{const char*}{ t}, \param{int}{ pos = 0}} \param{ const}{}\\
341 \func{bool}{Matches}{\param{const wxRegex\&}{ r}, \param{int}{ pos = 0}} \param{ const}{}
342
343 Return 1 if target appears at position {\it pos} in wxString; else 0.
344
345 \membersection{wxString::OK}\label{wxstringOK}
346
347 \func{int}{OK}{\param{void}{}} \param{ const}{}
348
349 \membersection{wxString::Prepend}\label{wxstringPrepend}
350
351 \func{wxString\&}{Prepend}{\param{const wxString\&}{ y}}\\
352 \func{wxString\&}{Prepend}{\param{const wxSubString\&}{ y}}\\
353 \func{wxString\&}{Prepend}{\param{const char*}{ t}}\\
354 \func{wxString\&}{Prepend}{\param{char}{ c}}
355
356 Prepend.
357
358 \func{wxString\&}{Prepend}{\param{char}{ c}, \param{int}{ rep=1}}
359
360 Prepend {\it c}, {\it rep} times.
361
362 \membersection{wxString::Readline}\label{wxstringReadline}
363
364 \func{friend int}{Readline}{\param{istream\&}{ s}, \param{wxString\&}{ x},
365 \param{char}{ terminator = '$\backslash$n'},
366 \param{int}{ discard\_terminator = 1}}\\
367 \func{friend int}{Readline}{\param{FILE *}{ f}, \param{wxString\&}{ x},
368 \param{char}{ terminator = '$\backslash$n'},
369 \param{int}{ discard\_terminator = 1}}
370
371 \membersection{wxString::Remove}\label{wxstringRemove}
372
373 \func{wxString\&}{RemoveLast}{\param{void}{}}\\
374 \func{wxString\&}{Remove}{\param{int}{ pos}}\\
375 \func{wxString\&}{Remove}{\param{int}{ pos}, \param{int}{ len}}
376
377 Remove {\it pos} to end of string.
378
379 \membersection{wxString::Replace}\label{wxstringReplace}
380
381 \func{wxString\&}{Replace}{\param{int}{ pos}, \param{int}{ n}, \param{const char*}{ s}}\\
382 \func{wxString\&}{Replace}{\param{int}{ pos}, \param{int}{ n}, \param{const wxString\&}{ s}}
383
384 \membersection{wxString::Replicate}\label{wxstringReplicate}
385
386 \func{friend wxString}{Replicate}{\param{char}{ c}, \param{int}{ n}}\\
387 \func{friend wxString}{Replicate}{\param{const wxString\&}{ y}, \param{int}{ n}}
388
389 Replication.
390
391 \membersection{wxString::Reverse}\label{wxstringReverse}
392
393 \func{void}{Reverse}{\param{void}{}}\\
394 \func{friend wxString}{Reverse}{\param{wxString\&}{ x}}
395
396 \membersection{wxString::sprintf}\label{wxstringsprintf}
397 \func{void}{sprintf}{\param{const wxString\& }{ fmt}}
398
399 Formatted assignment. We do not use the 'sprintf' constructor anymore,
400 because with that constructor, every initialisation with a string would
401 go through sprintf and this is not desirable, because sprintf
402 interprets some characters. With the above function we can write:
403
404 \begin{verbatim}
405 wxString msg; msg.sprintf("Processing item %d\n", count);
406 \end{verbatim}
407
408 \membersection{wxString::Strip}\label{wxstringStrip}
409
410 \begin{verbatim}
411 enumStripType {leading = 0x1, trailing = 0x2, both = 0x3};
412 \end{verbatim}
413
414 \func{wxSubString}{Strip}{\param{StripType}{ s = trailing}, \param{char}{ c = ' '}}
415
416 Strip characterss at the front and/or end.
417 StripType is defined for bitwise ORing.
418
419 \membersection{wxString::SubString}\label{wxstringSubString}
420
421 \func{wxString}{SubString}{\param{int}{ from}, \param{int}{ to}}
422
423 Edward Zimmermann's additions.
424
425 \membersection{wxString::Through}\label{wxstringThrough}
426
427 \func{wxSubString}{Through}{\param{int}{ pos}}\\
428 \func{wxSubString}{Through}{\param{const wxString\&}{ x}, \param{int}{ startpos = 0}}\\
429 \func{wxSubString}{Through}{\param{const wxSubString\&}{ x}, \param{int}{ startpos = 0}}\\
430 \func{wxSubString}{Through}{\param{const char*}{ t}, \param{int}{ startpos = 0}}\\
431 \func{wxSubString}{Through}{\param{char}{ c}, \param{int}{ startpos = 0}}\\
432 \func{wxSubString}{Through}{\param{const wxRegex\&}{ r}, \param{int}{ startpos = 0}}
433
434 \membersection{wxString::Upcase}\label{wxstringUpcase}
435
436 \func{void}{Upcase}{\param{void}{}}\\
437 \func{friend wxString}{Upcase}{\param{wxString\&}{ x}}
438
439 \membersection{wxString::UpperCase}\label{wxstringUpperCase}
440
441 \func{void}{UpperCase}{\param{void}{}}\\
442
443 \membersection{wxString::operator $=$}\label{wxstringoperatorassign}
444
445 \func{wxString\&}{operator $=$}{\param{const wxString\&}{ y}}\\
446 \func{wxString\&}{operator $=$}{\param{const char*}{ y}}\\
447 \func{wxString\&}{operator $=$}{\param{char}{ c}}\\
448 \func{wxString\&}{operator $=$}{\param{const wxSubString\&}{ y}}
449
450 Assignment.
451
452 \membersection{wxString::operator $+=$}\label{wxstringPlusEqual}
453
454 \func{wxString\&}{operator $+=$}{\param{const wxString\&}{ y}}\\
455 \func{wxString\&}{operator $+=$}{\param{const wxSubString\&}{ y}}\\
456 \func{wxString\&}{operator $+=$}{\param{const char*}{ t}}\\
457 \func{wxString\&}{operator $+=$}{\param{char}{ c}}
458
459 Concatenation.
460
461 \membersection{wxString::operator []}\label{wxstringoperatorbracket}
462
463 \func{char\&}{operator []}{\param{int}{ i}}
464
465 Element extraction.
466
467 \membersection{wxString::operator ()}\label{wxstringoperatorparenth}
468
469 \func{char\&}{operator ()}{\param{int}{ i}}
470
471 \membersection{wxString::operator \cinsert}\label{wxstringoperatorout}
472 \func{friend ostream\&}{operator \cinsert}{\param{ostream\&}{ s}, \param{const wxString\&}{ x}}\\
473 \func{friend ostream\&}{operator \cinsert}{\param{ostream\&}{ s}, \param{const wxSubString\&}{ x}}
474
475 \membersection{wxString::operator \cextract}\label{wxstringoperatorin}
476 \func{friend istream\&}{operator \cextract}{\param{istream\&}{ s}, \param{wxString\&}{ x}}
477
478 \membersection{wxString::operator const char*}\label{wxstringoperatorconstcharpt}
479 \constfunc{}{operator const char*}{\param{void}{}}
480
481 Conversion.
482
483 \membersection{wxCHARARG}\label{wxstringwxCHARARG}
484
485 \begin{verbatim}
486 #define wxCHARARG(s) ((const wxString\& )(s).Chars())
487 \end{verbatim}
488
489 Here is a very, very, very ugly macro, but it makes things more
490 transparent in cases, where a library function requires a
491 (const wxString\& ) argument. This is especially the case in wxWindows,
492 where all char-arguments are (const wxString\& ) and not (const char* ).
493 This macro should only be used in such cases and NOT to
494 modify the internal data.
495 The conventional way would be 'function((char*)string.Chars())'.
496 With the wxCHARARG macro, this can be achieved by 'function(wxCHARARG(string))'.
497 This makes it clearer that the usage should be confined
498 to arguments.
499
500 \membersection{CommonPrefix}\label{wxstringCommonPrefix}
501
502 \func{friend wxString}{CommonPrefix}{\param{const wxString\&}{ x}, \param{const wxString\&}{ y},\\
503 \param{int}{ startpos = 0}}\\
504
505 \membersection{CommonSuffix}\label{wxstringCommonSuffix}
506
507 \func{friend wxString}{CommonSuffix}{\param{const wxString\&}{ x}, \param{const wxString\&}{ y},\\
508 \param{int}{ startpos = -1}}
509
510 \membersection{Compare}\label{wxstringCompare}
511
512 \func{int}{Compare}{\param{const wxString\&}{ x}, \param{const wxString\&}{ y}}\\
513 \func{int}{Compare}{\param{const wxString\&}{ x}, \param{const wxSubString\&}{ y}}\\
514 \func{int}{Compare}{\param{const wxString\&}{ x}, \param{const char*}{ y}}\\
515 \func{int}{Compare}{\param{const wxSubString\&}{ x}, \param{const wxString\&}{ y}}\\
516 \func{int}{Compare}{\param{const wxSubString\&}{ x}, \param{const wxSubString\&}{ y}}\\
517 \func{int}{Compare}{\param{const wxSubString\&}{ x}, \param{const char*}{ y}}
518
519 Case dependent comparison. Returns 0 if the match succeeded.
520
521 \membersection{FCompare}\label{wxstringFCompare}
522
523 \func{int}{FCompare}{\param{const wxString\&}{ x}, \param{const wxString\&}{ y}}
524
525 Case independent comparison. Returns 0 if the match succeeded.
526
527 \membersection{Comparison operators}\label{wxstringComparison}
528
529 \func{int}{operator $==$}{\param{const wxString\&}{ x}, \param{const wxString\&}{ y}}\\
530 \func{int}{operator $!=$}{\param{const wxString\&}{ x}, \param{const wxString\&}{ y}}\\
531 \func{int}{operator $>$}{\param{const wxString\&}{ x}, \param{const wxString\&}{ y}}\\
532 \func{int}{operator $>=$}{\param{const wxString\&}{ x}, \param{const wxString\&}{ y}}\\
533 \func{int}{operator $<$}{\param{const wxString\&}{ x}, \param{const wxString\&}{ y}}\\
534 \func{int}{operator $<=$}{\param{const wxString\&}{ x}, \param{const wxString\&}{ y}}\\
535 \func{int}{operator $==$}{\param{const wxString\&}{ x}, \param{const wxSubString\&}{ y}}\\
536 \func{int}{operator $!=$}{\param{const wxString\&}{ x}, \param{const wxSubString\&}{ y}}\\
537 \func{int}{operator $>$}{\param{const wxString\&}{ x}, \param{const wxSubString\&}{ y}}\\
538 \func{int}{operator $>=$}{\param{const wxString\&}{ x}, \param{const wxSubString\&}{ y}}\\
539 \func{int}{operator $<$}{\param{const wxString\&}{ x}, \param{const wxSubString\&}{ y}}\\
540 \func{int}{operator $<=$}{\param{const wxString\&}{ x}, \param{const wxSubString\&}{ y}}\\
541 \func{int}{operator $==$}{\param{const wxString\&}{ x}, \param{const char*}{ t}}\\
542 \func{int}{operator $!=$}{\param{const wxString\&}{ x}, \param{const char*}{ t}}\\
543 \func{int}{operator $>$}{\param{const wxString\&}{ x}, \param{const char*}{ t}}\\
544 \func{int}{operator $>=$}{\param{const wxString\&}{ x}, \param{const char*}{ t}}\\
545 \func{int}{operator $<$}{\param{const wxString\&}{ x}, \param{const char*}{ t}}\\
546 \func{int}{operator $<=$}{\param{const wxString\&}{ x}, \param{const char*}{ t}}\\
547 \func{int}{operator $==$}{\param{const wxSubString\&}{ x}, \param{const wxString\&}{ y}}\\
548 \func{int}{operator $!=$}{\param{const wxSubString\&}{ x}, \param{const wxString\&}{ y}}\\
549 \func{int}{operator $>$}{\param{const wxSubString\&}{ x}, \param{const wxString\&}{ y}}\\
550 \func{int}{operator $>=$}{\param{const wxSubString\&}{ x}, \param{const wxString\&}{ y}}\\
551 \func{int}{operator $<$}{\param{const wxSubString\&}{ x}, \param{const wxString\&}{ y}}\\
552 \func{int}{operator $<=$}{\param{const wxSubString\&}{ x}, \param{const wxString\&}{ y}}\\
553 \func{int}{operator $==$}{\param{const wxSubString\&}{ x}, \param{const wxSubString\&}{ y}}\\
554 \func{int}{operator $!=$}{\param{const wxSubString\&}{ x}, \param{const wxSubString\&}{ y}}\\
555 \func{int}{operator $>$}{\param{const wxSubString\&}{ x}, \param{const wxSubString\&}{ y}}\\
556 \func{int}{operator $>=$}{\param{const wxSubString\&}{ x}, \param{const wxSubString\&}{ y}}\\
557 \func{int}{operator $<$}{\param{const wxSubString\&}{ x}, \param{const wxSubString\&}{ y}}\\
558 \func{int}{operator $<=$}{\param{const wxSubString\&}{ x}, \param{const wxSubString\&}{ y}}\\
559 \func{int}{operator $==$}{\param{const wxSubString\&}{ x}, \param{const char*}{ t}}\\
560 \func{int}{operator $!=$}{\param{const wxSubString\&}{ x}, \param{const char*}{ t}}\\
561 \func{int}{operator $>$}{\param{const wxSubString\&}{ x}, \param{const char*}{ t}}\\
562 \func{int}{operator $>=$}{\param{const wxSubString\&}{ x}, \param{const char*}{ t}}\\
563 \func{int}{operator $<$}{\param{const wxSubString\&}{ x}, \param{const char*}{ t}}\\
564 \func{int}{operator $<=$}{\param{const wxSubString\&}{ x}, \param{const char*}{ t}}
565
566 \membersection{operator $+$}\label{wxstringoperatorplus}
567
568 \func{wxString}{operator $+$}{\param{const wxString\&}{ x}, \param{const wxString\&}{ y}}\\
569 \func{wxString}{operator $+$}{\param{const wxString\&}{ x}, \param{const wxSubString\&}{ y}}\\
570 \func{wxString}{operator $+$}{\param{const wxString\&}{ x}, \param{const char*}{ y}}\\
571 \func{wxString}{operator $+$}{\param{const wxString\&}{ x}, \param{char}{ y}}\\
572 \func{wxString}{operator $+$}{\param{const wxSubString\&}{ x}, \param{const wxString\&}{ y}}\\
573 \func{wxString}{operator $+$}{\param{const wxSubString\&}{ x}, \param{const wxSubString\&}{ y}}\\
574 \func{wxString}{operator $+$}{\param{const wxSubString\&}{ x}, \param{const char*}{ y}}\\
575 \func{wxString}{operator $+$}{\param{const wxSubString\&}{ x}, \param{char}{ y}}\\
576 \func{wxString}{operator $+$}{\param{const char*}{ x}, \param{const wxString\&}{ y}}\\
577 \func{wxString}{operator $+$}{\param{const char*}{ x}, \param{const wxSubString\&}{ y}}
578
579 \membersection{Join}\label{wxstringJoin}
580
581 \func{friend wxString}{Join}{\param{wxString}{ src[]}, \param{int}{ n}, \param{const wxString\&}{ sep}}
582
583 \membersection{Split}\label{wxstringSplit}
584
585 \func{friend int}{Split}{\param{const wxString\&}{ x}, \param{wxString}{ res[]}, \param{int}{ maxn},\\
586 \param{const wxString\&}{ sep}}\\
587 \func{friend int}{Split}{\param{const wxString\&}{ x}, \param{wxString}{ res[]}, \param{int}{ maxn},\\
588 \param{const wxRegex\&}{ sep}}\\
589
590 Split string into array res at separators; return number of elements
591
592
593