1 \section{\class{wxString
}}\label{wxstring
}
3 \overview{Overview
}{wxstringoverview
}
5 \helpref{Member functions by category
}{wxstringcategories
}
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
12 \membersection{wxString::wxString
}\label{wxstringconstruct
}
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
}}
23 \membersection{wxString::
\destruct{wxString
}}\label{wxstringdestruct
}
25 \func{void
}{\destruct{wxString
}}{\void}
29 \membersection{wxString::Alloc
}\label{wxstringAlloc
}
31 \func{void
}{Alloc
}{\param{int
}{ newsize
}}
33 Preallocate some space for wxString.
35 \membersection{wxString::Allocation
}\label{wxstringAllocation
}
37 \func{int
}{Allocation
}{\param{void
}{}} \param{ const
}{}
39 Report current allocation (not length!).
41 \membersection{wxString::Append
}\label{wxstringAppend
}
43 \func{wxString\&
}{Append
}{\param{const char*
}{ cs
}}\\
44 \func{wxString\&
}{Append
}{\param{const wxString\&
}{ s
}}
48 \func{wxString\&
}{Append
}{\param{char
}{ c
},
\param{int
}{ rep =
1}}
50 Append
{\it c
},
{\it rep
} times
52 \membersection{wxString::After
}\label{wxstringAfter
}
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}}
61 \membersection{wxString::At
}\label{wxstringAt
}
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}}
71 wxSubString extraction.
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.
77 \membersection{wxString::Before
}\label{wxstringBefore
}
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}}
86 \membersection{wxString::Capitalize
}\label{wxstringCapitalize
}
88 \func{void
}{Capitalize
}{\param{void
}{}}\\
89 \func{friend wxString
}{Capitalize
}{\param{wxString\&
}{ x
}}
91 \membersection{wxString::Cat
}\label{wxstringCat
}
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
}}
106 Concatenate first two arguments, store the result in the last argument.
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
}}
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
}}
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.
138 \membersection{wxString::Chars
}\label{wxstringChars
}
140 \func{const char*
}{Chars
}{\param{void
}{}} \param{ const
}{}
144 \membersection{wxString::CompareTo
}\label{wxstringCompareTo
}
147 #define NO_POS ((int)(-
1)) // undefined position
148 enum CaseCompare
{exact, ignoreCase
};
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
}{}
154 \membersection{wxString::Contains
}\label{wxstringContains
}
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
}{}
162 Return
1 if target appears anyhere in wxString; else
0.
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
}{}
167 Case dependent/independent variation .
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
}{}
175 Return
1 if the target appears anywhere after position
{\it pos
} (or
176 before, if
{\it pos
} is negative) in wxString; else
0.
178 \membersection{wxString::Copy
}\label{wxstringCopy
}
180 \func{wxString
}{Copy
}{\param{void
}{}} \param{ const
}{}
184 \membersection{wxString::Del
}\label{wxstringDel
}
186 \func{wxString\&
}{Del
}{\param{int
}{ pos
},
\param{int
}{ len
}}
188 Delete
{\it len
} characters starting at
{\it pos
}.
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}}
196 Delete the first occurrence of target after
{\it startpos
}.
198 \membersection{wxString::DownCase
}\label{wxstringDownCase
}
200 \func{void
}{Downcase
}{\param{void
}{}}\\
201 \func{friend wxString
}{Downcase
}{\param{wxString\&
}{ x
}}
203 \membersection{wxString::Elem
}\label{wxstringElem
}
205 \func{char
}{Elem
}{\param{int
}{ i
}} \param{ const
}{}
209 \membersection{wxString::Empty
}\label{wxstringEmpty
}
211 \func{int
}{Empty
}{\param{void
}{}} \param{ const
}{}
213 \membersection{wxString::Error
}\label{wxstringError
}
215 \func{void
}{Error
}{\param{const char*
}{ msg
}} \param{ const
}{}
217 \membersection{wxString::First
}\label{wxstringFirst
}
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
}{}
223 Return first or last occurrence of item.
225 \membersection{wxString::Firstchar
}\label{wxstringFirstchar
}
226 \func{char
}{Firstchar
}{\param{void
}{}} \param{ const
}{}
230 \membersection{wxString::Freq
}\label{wxstringFreq
}
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
}{}
237 Return number of occurrences of target in wxString.
239 \membersection{wxString::From
}\label{wxstringFrom
}
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}}
248 \membersection{wxString::GetData
}\label{wxstringGetData
}
250 \func{char*
}{GetData
}{\param{void
}{}}
252 wxWindows compatibility conversion.
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
}}
261 Global substitution: substitute all occurrences of
{\it pat
} with
{\it repl
},
262 returning the number of matches.
264 \membersection{wxString::Index
}\label{wxstringIndex
}
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
}{}
274 Return the position of target in string, or -
1 for failure.
276 \membersection{wxString::Insert
}\label{wxstringInsert
}
278 \func{wxString\&
}{Insert
}{\param{int
}{ pos
},
\param{const char*
}{ s
}}\\
279 \func{wxString\&
}{Insert
}{\param{int
}{ pos
},
\param{const wxString\&
}{ s
}}
283 \membersection{wxString::IsAscii
}\label{wxstringIsAscii
}
285 \func{int
}{IsAscii
}{\param{void
}{}} \param{ const
}{}
287 Classification (should be capital, because of ctype.h macros).
289 \membersection{wxString::IsDefined
}\label{wxstringIsDefined
}
291 \func{int
}{IsDefined
}{\param{void
}{}} \param{ const
}{}
293 Classification (should be capital, because of ctype.h macros).
295 \membersection{wxString::IsNull
}\label{wxstringIsNull
}
297 \func{int
}{IsNull
}{\param{void
}{}} \param{ const
}{}
299 Classification (should be capital, because of ctype.h macros).
301 \membersection{wxString::IsNumber
}\label{wxstringIsNumber
}
303 \func{int
}{IsNumber
}{\param{void
}{}} \param{ const
}{}
305 Classification (should be capital, because of ctype.h macros).
307 \membersection{wxString::IsWord
}\label{wxstringIsWord
}
309 \func{int
}{IsWord
}{\param{void
}{}} \param{ const
}{}
311 Classification (should be capital, because of ctype.h macros).
313 \membersection{wxString::Last
}\label{wxstringLast
}
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
}{}
319 First or last occurrence of item.
321 \membersection{wxString::Lastchar
}\label{wxstringLastchar
}
323 \func{char
}{Lastchar
}{\param{void
}{}} \param{ const
}{}
327 \membersection{wxString::Length
}\label{wxstringLength
}
329 \func{unsigned int
}{Length
}{\param{void
}{}} \param{ const
}{}
331 \membersection{wxString::LowerCase
}\label{wxstringLowerCase
}
333 \func{void
}{LowerCase
}{\param{void
}{}}
335 \membersection{wxString::Matches
}\label{wxstringMatches
}
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
}{}
343 Return
1 if target appears at position
{\it pos
} in wxString; else
0.
345 \membersection{wxString::OK
}\label{wxstringOK
}
347 \func{int
}{OK
}{\param{void
}{}} \param{ const
}{}
349 \membersection{wxString::Prepend
}\label{wxstringPrepend
}
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
}}
358 \func{wxString\&
}{Prepend
}{\param{char
}{ c
},
\param{int
}{ rep=
1}}
360 Prepend
{\it c
},
{\it rep
} times.
362 \membersection{wxString::Readline
}\label{wxstringReadline
}
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}}
371 \membersection{wxString::Remove
}\label{wxstringRemove
}
373 \func{wxString\&
}{RemoveLast
}{\param{void
}{}}\\
374 \func{wxString\&
}{Remove
}{\param{int
}{ pos
}}\\
375 \func{wxString\&
}{Remove
}{\param{int
}{ pos
},
\param{int
}{ len
}}
377 Remove
{\it pos
} to end of string.
379 \membersection{wxString::Replace
}\label{wxstringReplace
}
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
}}
384 \membersection{wxString::Replicate
}\label{wxstringReplicate
}
386 \func{friend wxString
}{Replicate
}{\param{char
}{ c
},
\param{int
}{ n
}}\\
387 \func{friend wxString
}{Replicate
}{\param{const wxString\&
}{ y
},
\param{int
}{ n
}}
391 \membersection{wxString::Reverse
}\label{wxstringReverse
}
393 \func{void
}{Reverse
}{\param{void
}{}}\\
394 \func{friend wxString
}{Reverse
}{\param{wxString\&
}{ x
}}
396 \membersection{wxString::sprintf
}\label{wxstringsprintf
}
397 \func{void
}{sprintf
}{\param{const wxString\&
}{ fmt
}}
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:
405 wxString msg; msg.sprintf("Processing item
%d\n", count);
408 \membersection{wxString::Strip
}\label{wxstringStrip
}
411 enumStripType
{leading =
0x1, trailing =
0x2, both =
0x3};
414 \func{wxSubString
}{Strip
}{\param{StripType
}{ s = trailing
},
\param{char
}{ c = ' '
}}
416 Strip characterss at the front and/or end.
417 StripType is defined for bitwise ORing.
419 \membersection{wxString::SubString
}\label{wxstringSubString
}
421 \func{wxString
}{SubString
}{\param{int
}{ from
},
\param{int
}{ to
}}
423 Edward Zimmermann's additions.
425 \membersection{wxString::Through
}\label{wxstringThrough
}
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}}
434 \membersection{wxString::Upcase
}\label{wxstringUpcase
}
436 \func{void
}{Upcase
}{\param{void
}{}}\\
437 \func{friend wxString
}{Upcase
}{\param{wxString\&
}{ x
}}
439 \membersection{wxString::UpperCase
}\label{wxstringUpperCase
}
441 \func{void
}{UpperCase
}{\param{void
}{}}\\
443 \membersection{wxString::operator $=$
}\label{wxstringoperatorassign
}
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
}}
452 \membersection{wxString::operator $+=$
}\label{wxstringPlusEqual
}
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
}}
461 \membersection{wxString::operator
[]}\label{wxstringoperatorbracket
}
463 \func{char\&
}{operator
[]}{\param{int
}{ i
}}
467 \membersection{wxString::operator ()
}\label{wxstringoperatorparenth
}
469 \func{char\&
}{operator ()
}{\param{int
}{ i
}}
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
}}
475 \membersection{wxString::operator
\cextract}\label{wxstringoperatorin
}
476 \func{friend istream\&
}{operator
\cextract}{\param{istream\&
}{ s
},
\param{wxString\&
}{ x
}}
478 \membersection{wxString::operator const char*
}\label{wxstringoperatorconstcharpt
}
479 \constfunc{}{operator const char*
}{\param{void
}{}}
483 \membersection{wxCHARARG
}\label{wxstringwxCHARARG
}
486 #define wxCHARARG(s) ((const wxString\& )(s).Chars())
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
500 \membersection{CommonPrefix
}\label{wxstringCommonPrefix
}
502 \func{friend wxString
}{CommonPrefix
}{\param{const wxString\&
}{ x
},
\param{const wxString\&
}{ y
},\\
503 \param{int
}{ startpos =
0}}\\
505 \membersection{CommonSuffix
}\label{wxstringCommonSuffix
}
507 \func{friend wxString
}{CommonSuffix
}{\param{const wxString\&
}{ x
},
\param{const wxString\&
}{ y
},\\
508 \param{int
}{ startpos = -
1}}
510 \membersection{Compare
}\label{wxstringCompare
}
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
}}
519 Case dependent comparison. Returns
0 if the match succeeded.
521 \membersection{FCompare
}\label{wxstringFCompare
}
523 \func{int
}{FCompare
}{\param{const wxString\&
}{ x
},
\param{const wxString\&
}{ y
}}
525 Case independent comparison. Returns
0 if the match succeeded.
527 \membersection{Comparison operators
}\label{wxstringComparison
}
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
}}
566 \membersection{operator $+$
}\label{wxstringoperatorplus
}
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
}}
579 \membersection{Join
}\label{wxstringJoin
}
581 \func{friend wxString
}{Join
}{\param{wxString
}{ src
[]},
\param{int
}{ n
},
\param{const wxString\&
}{ sep
}}
583 \membersection{Split
}\label{wxstringSplit
}
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
}}\\
590 Split string into array res at separators; return number of elements