1998-05-20 10:25:30 -04:00
|
|
|
\section{\class{wxString}}\label{wxstring}
|
|
|
|
|
1998-07-28 04:12:20 -04:00
|
|
|
\wxheading{Derived from}
|
|
|
|
|
|
|
|
None
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1999-02-15 15:41:29 -05:00
|
|
|
\wxheading{Include files}
|
|
|
|
|
|
|
|
<wx/string.h>
|
|
|
|
|
1998-07-28 04:12:20 -04:00
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\overview{Overview}{wxstringoverview}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-28 04:12:20 -04:00
|
|
|
\latexignore{\rtfignore{\wxheading{Members}}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\membersection{wxString::wxString}\label{wxstringconstruct}
|
|
|
|
|
1998-07-28 04:12:20 -04:00
|
|
|
\func{}{wxString}{\void}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-28 04:12:20 -04:00
|
|
|
Default constructor.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-28 04:12:20 -04:00
|
|
|
\func{}{wxString}{\param{const wxString\&}{ x}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-28 04:12:20 -04:00
|
|
|
Copy constructor.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-28 04:12:20 -04:00
|
|
|
\func{}{wxString}{\param{char}{ ch}, \param{size\_t}{ n = 1}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-28 04:12:20 -04:00
|
|
|
Constructs a string of {\it n} copies of character {\it ch}.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-28 04:12:20 -04:00
|
|
|
\func{}{wxString}{\param{const char*}{ psz}, \param{size\_t}{ nLength = STRING\_MAXLEN}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-28 04:12:20 -04:00
|
|
|
Takes first {\it nLength} characters from the C string {\it psz}.
|
|
|
|
The default value of STRING\_MAXLEN means take all the string.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-28 04:12:20 -04:00
|
|
|
\func{}{wxString}{\param{const unsigned char*}{ psz}, \param{size\_t}{ nLength = STRING\_MAXLEN}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-28 04:12:20 -04:00
|
|
|
For compilers using unsigned char: takes first {\it nLength} characters from the C string {\it psz}.
|
|
|
|
The default value of STRING\_MAXLEN means take all the string.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-28 04:12:20 -04:00
|
|
|
\func{}{wxString}{\param{const wchar\_t*}{ psz}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-28 04:12:20 -04:00
|
|
|
Constructs a string from the wide (UNICODE) string.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-28 04:12:20 -04:00
|
|
|
\membersection{wxString::\destruct{wxString}}\label{wxstringdestruct}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-28 04:12:20 -04:00
|
|
|
\func{}{\destruct{wxString}}{\void}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-28 04:12:20 -04:00
|
|
|
String destructor. Note that this is not virtual, so wxString must not be inherited from.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-28 04:12:20 -04:00
|
|
|
\membersection{wxString::Alloc}\label{wxstringAlloc}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-28 04:12:20 -04:00
|
|
|
\func{void}{Alloc}{\param{uint}{ newsize}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-28 04:12:20 -04:00
|
|
|
Preallocate some space for wxString. Only works if the data of this string is not shared.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-28 04:12:20 -04:00
|
|
|
\membersection{wxString::Append}\label{wxstringAppend}
|
|
|
|
|
|
|
|
\func{wxString\&}{Append}{\param{const char*}{ psz}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-28 04:12:20 -04:00
|
|
|
Concatenates {\it psz} to this string, returning a reference to it.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-28 04:12:20 -04:00
|
|
|
\func{wxString\&}{Append}{\param{char}{ ch}, \param{int}{ count = 1}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-28 04:12:20 -04:00
|
|
|
Concatenates character {\it ch} to this string, {\it count} times, returning a reference
|
|
|
|
to it.
|
|
|
|
|
|
|
|
\membersection{wxString::After}\label{wxstringAfter}
|
|
|
|
|
|
|
|
\constfunc{wxString}{After}{\param{char}{ ch}}
|
|
|
|
|
|
|
|
Gets all the characters after the first occurence of {\it ch}.
|
|
|
|
Returns the empty string if {\it ch} is not found.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\membersection{wxString::Before}\label{wxstringBefore}
|
|
|
|
|
1998-07-28 04:12:20 -04:00
|
|
|
\constfunc{wxString}{Before}{\param{char}{ ch}}
|
|
|
|
|
|
|
|
Gets all characters before the last occurence of {\it ch}.
|
|
|
|
Returns empty string if {\it ch} is not found.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\membersection{wxString::Cmp}\label{wxstringcmp}
|
|
|
|
|
|
|
|
\constfunc{int}{Cmp}{\param{const char*}{ psz}}
|
|
|
|
|
|
|
|
Case-sensitive comparison.
|
|
|
|
|
|
|
|
Returns 0 if equal, +1 if greater or -1 if less.
|
|
|
|
|
|
|
|
See also CmpNoCase, IsSameAs.
|
|
|
|
|
|
|
|
\membersection{wxString::CmpNoCase}\label{wxstringcmpnocase}
|
|
|
|
|
|
|
|
\constfunc{int}{CmpNoCase}{\param{const char*}{ psz}}
|
|
|
|
|
|
|
|
Case-insensitive comparison.
|
|
|
|
|
|
|
|
Returns 0 if equal, +1 if greater or -1 if less.
|
|
|
|
|
|
|
|
See also Cmp, IsSameAs.
|
|
|
|
|
1998-05-20 10:25:30 -04:00
|
|
|
\membersection{wxString::CompareTo}\label{wxstringCompareTo}
|
|
|
|
|
|
|
|
\begin{verbatim}
|
|
|
|
#define NO_POS ((int)(-1)) // undefined position
|
1998-07-28 04:12:20 -04:00
|
|
|
enum caseCompare {exact, ignoreCase};
|
1998-05-20 10:25:30 -04:00
|
|
|
\end{verbatim}
|
|
|
|
|
1998-07-28 04:12:20 -04:00
|
|
|
\constfunc{int}{CompareTo}{\param{const char*}{ psz}, \param{caseCompare}{ cmp = exact}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-28 04:12:20 -04:00
|
|
|
Case-sensitive comparison. Returns 0 if equal, 1 if greater or -1 if less.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-28 04:12:20 -04:00
|
|
|
\membersection{wxString::Contains}\label{wxstringContains}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-28 04:12:20 -04:00
|
|
|
\func{bool}{Contains}{\param{const wxString\&}{ str}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-28 04:12:20 -04:00
|
|
|
Returns 1 if target appears anyhere in wxString; else 0.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\membersection{wxString::Empty}\label{wxstringempty}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\func{void}{Empty}{\void}
|
|
|
|
|
|
|
|
Reinitializes the string and frees the data.
|
|
|
|
|
|
|
|
\membersection{wxString::Find}\label{wxstringfind}
|
|
|
|
|
|
|
|
\constfunc{int}{Find}{\param{char}{ ch}, \param{bool}{ fromEnd = FALSE}}
|
|
|
|
|
|
|
|
Searches for the given character. Returns the starting index, or -1 if not found.
|
|
|
|
|
|
|
|
\constfunc{int}{Find}{\param{const char*}{ sz}}
|
|
|
|
|
|
|
|
Searches for the given string. Returns the starting index, or -1 if not found.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-28 04:12:20 -04:00
|
|
|
\membersection{wxString::First}\label{wxstringfirst}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-28 04:12:20 -04:00
|
|
|
\func{size\_t}{First}{\param{char}{ c}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-28 04:12:20 -04:00
|
|
|
\constfunc{size\_t}{First}{\param{const char*}{ psz}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-28 04:12:20 -04:00
|
|
|
\constfunc{size\_t}{First}{\param{const wxString\&}{ str}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-28 04:12:20 -04:00
|
|
|
\constfunc{size\_t}{First}{\param{const char}{ ch}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
Returns the first occurrence of the item.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\membersection{wxString::GetChar}\label{wxstringgetchar}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\constfunc{char}{GetChar}{\param{size\_t}{ n}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
Returns the character at position {\it n} (read-only).
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\membersection{wxString::GetData}\label{wxstringGetData}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\constfunc{const char*}{GetData}{\void}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
wxWindows compatibility conversion. Returns a constant pointer to the data in the string.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\membersection{wxString::GetWritableChar}\label{wxstringgetwritablechar}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\func{char\&}{GetWritableChar}{\param{size\_t}{ n}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
Returns a reference to the character at position {\it n}.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\membersection{wxString::GetWriteBuf}\label{wxstringgetwritebuf}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\func{char*}{GetWriteBuf}{\param{uint}{ len}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
Returns a writable buffer of at least {\it len} bytes.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
Call \helpref{wxString::UngetWriteBuf}{wxstringungetwritebuf} as soon as possible
|
|
|
|
to put the string back into a reasonable state.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\membersection{wxString::Index}\label{wxstringIndex}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\constfunc{size\_t}{Index}{\param{char}{ ch}, \param{int}{ startpos = 0}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
Same as \helpref{wxString::Find}{wxstringfind}.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\constfunc{size\_t}{Index}{\param{const char*}{ sz}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
Same as \helpref{wxString::Find}{wxstringfind}.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\constfunc{size\_t}{Index}{\param{const char*}{ sz}, \param{bool}{ caseSensitive = TRUE}, \param{bool}{ fromEnd = FALSE}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
Search the element in the array, starting from either side.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
If {\it fromEnd} is TRUE, reverse search direction.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
If {\bf caseSensitive}, comparison is case sensitive (the default).
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
Returns the index of the first item matched, or NOT\_FOUND.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1999-01-07 10:22:05 -05:00
|
|
|
% TODO
|
|
|
|
%\membersection{wxString::insert}\label{wxstringinsert}
|
|
|
|
% Wrong!
|
|
|
|
%\func{void}{insert}{\param{const wxString\&}{ str}, \param{uint}{ index}}
|
|
|
|
%
|
|
|
|
%Add new element at the given position.
|
|
|
|
%
|
1998-05-20 10:25:30 -04:00
|
|
|
\membersection{wxString::IsAscii}\label{wxstringIsAscii}
|
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\constfunc{bool}{IsAscii}{\void}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
Returns TRUE if the string is ASCII.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\membersection{wxString::IsEmpty}\label{wxstringisempty}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\constfunc{bool}{IsEmpty}{\void}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
Returns TRUE if the string is NULL.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\membersection{wxString::IsNull}\label{wxstringIsNull}
|
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\constfunc{bool}{IsNull}{\void}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
Returns TRUE if the string is NULL (same as IsEmpty).
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\membersection{wxString::IsNumber}\label{wxstringIsNumber}
|
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\constfunc{bool}{IsNumber}{\void}
|
|
|
|
|
|
|
|
Returns TRUE if the string is a number.
|
|
|
|
|
|
|
|
\membersection{wxString::IsSameAs}\label{wxstringissameas}
|
|
|
|
|
|
|
|
\constfunc{bool}{IsSameAs}{\param{const char*}{ psz}, \param{bool}{ caseSensitive = TRUE}}
|
|
|
|
|
|
|
|
Test for string equality, case-sensitive (default) or not.
|
|
|
|
|
|
|
|
caseSensitive is TRUE by default (case matters).
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
Returns TRUE if strings are equal, FALSE otherwise.
|
|
|
|
|
|
|
|
See also Cmp, CmpNoCase.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\membersection{wxString::IsWord}\label{wxstringIsWord}
|
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\constfunc{bool}{IsWord}{\void}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
Returns TRUE if the string is a word. TODO: what's the definition of a word?
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\membersection{wxString::Last}\label{wxstringLast}
|
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\constfunc{char}{Last}{\void}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
Returns the last character.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\func{char\&}{Last}{\void}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
Returns a reference to the last character (writable).
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\membersection{wxString::Left}\label{wxstringleft}
|
|
|
|
|
|
|
|
\constfunc{wxString}{Left}{\param{size\_t}{ count}}
|
|
|
|
|
|
|
|
Returns the first {\it count} characters.
|
|
|
|
|
|
|
|
\constfunc{wxString}{Left}{\param{char}{ ch}}
|
|
|
|
|
|
|
|
Returns all characters before the first occurence of {\it ch}.
|
|
|
|
Returns the whole string if {\it ch} is not found.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\membersection{wxString::Len}\label{wxstringlen}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\constfunc{size\_t}{Len}{\void}
|
|
|
|
|
|
|
|
Returns the length of the string.
|
|
|
|
|
|
|
|
\membersection{wxString::Length}\label{wxstringlength}
|
|
|
|
|
|
|
|
\constfunc{size\_t}{Length}{\void}
|
|
|
|
|
|
|
|
Returns the length of the string (same as Len).
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\membersection{wxString::LowerCase}\label{wxstringLowerCase}
|
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\func{void}{LowerCase}{\void}
|
|
|
|
|
|
|
|
Same as MakeLower.
|
|
|
|
|
|
|
|
\membersection{wxString::MakeLower}\label{wxstringmakelower}
|
|
|
|
|
|
|
|
\func{void}{MakeLower}{\void}
|
|
|
|
|
|
|
|
Converts all characters to lower case.
|
|
|
|
|
|
|
|
\membersection{wxString::MakeUpper}\label{wxstringmakeupper}
|
|
|
|
|
|
|
|
\func{void}{MakeUpper}{\void}
|
|
|
|
|
|
|
|
Converts all characters to upper case.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\membersection{wxString::Matches}\label{wxstringMatches}
|
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\constfunc{bool}{Matches}{\param{const char*}{ szMask}}
|
|
|
|
|
|
|
|
Returns TRUE if the string contents matches a mask containing '*' and '?'.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\membersection{wxString::Mid}\label{wxstringmid}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\constfunc{wxString}{Mid}{\param{size\_t}{ first}, \param{size\_t}{ count = STRING\_MAXLEN}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
Returns a substring starting at {\it first}, with length {\it count}, or the rest of
|
|
|
|
the string if {\it count} is the default value.
|
|
|
|
|
|
|
|
\membersection{wxString::Pad}\label{wxstringpad}
|
|
|
|
|
|
|
|
\func{wxString\&}{Pad}{\param{size\_t}{ count}, \param{char}{ pad = ' '}, \param{bool}{ fromRight = TRUE}}
|
|
|
|
|
|
|
|
Adds {\it count} copies of {\it pad} to the beginning, or to the end of the string (the default).
|
|
|
|
|
|
|
|
Removes spaces from the left or from the right (default).
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\membersection{wxString::Prepend}\label{wxstringPrepend}
|
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\func{wxString\&}{Prepend}{\param{const wxString\&}{ str}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
Prepends {\it str} to this string, returning a reference to this string.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\membersection{wxString::Printf}\label{wxstringprintf}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\func{int}{Printf}{\param{const char* }{pszFormat}, \param{}{...}}
|
|
|
|
|
|
|
|
Similar to sprintf. Returns the number of characters written, or an integer less than zero
|
|
|
|
on error.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\membersection{wxString::PrintfV}\label{wxstringprintfv}
|
|
|
|
|
|
|
|
\func{int}{PrintfV}{\param{const char* }{pszFormat}, \param{va\_list}{ argPtr}}
|
|
|
|
|
|
|
|
Similar to vprintf. Returns the number of characters written, or an integer less than zero
|
|
|
|
on error.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\membersection{wxString::Remove}\label{wxstringRemove}
|
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\func{wxString\&}{Remove}{\param{size\_t}{ pos}}
|
|
|
|
|
|
|
|
Same as Truncate. Removes the portion from {\it pos} to the end of the string.
|
|
|
|
|
|
|
|
\func{wxString\&}{Remove}{\param{size\_t}{ pos}, \param{size\_t}{ len}}
|
|
|
|
|
|
|
|
Removes the last {\it len} characters from the string, starting at {\it pos}.
|
|
|
|
|
|
|
|
\membersection{wxString::RemoveLast}\label{wxstringremovelast}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\func{wxString\&}{RemoveLast}{\void}
|
|
|
|
|
|
|
|
Removes the last character.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\membersection{wxString::Replace}\label{wxstringReplace}
|
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\func{uint}{Replace}{\param{const char*}{ szOld}, \param{const char*}{ szNew}, \param{bool}{ replaceAll}}
|
|
|
|
|
|
|
|
Replace first (or all) occurences of substring with another one.
|
|
|
|
|
|
|
|
{\it replaceAll}: global replace (default), or only the first occurence.
|
|
|
|
|
|
|
|
Returns the number of replacements made.
|
|
|
|
|
|
|
|
\membersection{wxString::Right}\label{wxstringright}
|
|
|
|
|
|
|
|
\constfunc{wxString}{Right}{\param{size\_t}{ count}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
Returns the last {\it count} characters.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\constfunc{wxString}{Right}{\param{char}{ ch}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
Returns all characters after the last occurence of {\it ch}.
|
|
|
|
Returns the whole string if {\it ch} is not found.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\membersection{wxString::SetChar}\label{wxstringsetchar}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\func{void}{SetChar}{\param{size\_t}{ n}, \param{char}{ch}}
|
|
|
|
|
|
|
|
Sets the character at position {\it n}.
|
|
|
|
|
|
|
|
\membersection{wxString::Shrink}\label{wxstringshrink}
|
|
|
|
|
|
|
|
\func{void}{Shrink}{\void}
|
|
|
|
|
|
|
|
Minimizes the string's memory. Only works if the data of this string is not shared.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\membersection{wxString::sprintf}\label{wxstringsprintf}
|
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\func{void}{sprintf}{\param{const char* }{ fmt}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
The same as Printf.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\membersection{wxString::Strip}\label{wxstringStrip}
|
|
|
|
|
|
|
|
\begin{verbatim}
|
1998-07-29 02:51:33 -04:00
|
|
|
enum stripType {leading = 0x1, trailing = 0x2, both = 0x3};
|
1998-05-20 10:25:30 -04:00
|
|
|
\end{verbatim}
|
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\constfunc{wxString}{Strip}{\param{stripType}{ s = trailing}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
Strip characters at the front and/or end. The same as Trim except that it
|
|
|
|
doesn't change this string.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\membersection{wxString::Trim}\label{wxstringtrim}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\func{wxString\&}{Trim}{\param{bool}{ fromRight = TRUE}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
Removes spaces from the left or from the right (default).
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\membersection{wxString::Truncate}\label{wxstringtruncate}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\func{wxString\&}{Truncate}{\param{size\_t}{ len}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
Truncate the string to the given length.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\membersection{wxString::UngetWriteBuf}\label{wxstringungetwritebuf}
|
|
|
|
|
|
|
|
\func{void}{UngetWriteBuf}{\void}
|
|
|
|
|
|
|
|
Puts the string back into a reasonable state, after
|
|
|
|
\rtfsp\helpref{wxString::GetWriteBuf}{wxstringgetwritebuf} was called.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\membersection{wxString::UpperCase}\label{wxstringUpperCase}
|
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\func{void}{UpperCase}{\void}
|
|
|
|
|
|
|
|
The same as MakeUpper.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\membersection{wxString::operator $=$}\label{wxstringoperatorassign}
|
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\func{wxString\&}{operator $=$}{\param{const wxString\&}{ str}}
|
|
|
|
|
|
|
|
\func{wxString\&}{operator $=$}{\param{const char*}{ psz}}
|
|
|
|
|
|
|
|
\func{wxString\&}{operator $=$}{\param{char}{ c}}
|
|
|
|
|
|
|
|
\func{wxString\&}{operator $=$}{\param{const unsigned char*}{ psz}}
|
|
|
|
|
|
|
|
\func{wxString\&}{operator $=$}{\param{const wchar\_t*}{ pwz}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
Assignment.
|
1998-08-06 15:42:06 -04:00
|
|
|
|
|
|
|
\membersection{operator wxString::$+$}\label{wxstringoperatorplus}
|
|
|
|
|
|
|
|
Concatenation.
|
|
|
|
|
|
|
|
\func{wxString}{operator $+$}{\param{const wxString\&}{ x}, \param{const wxString\&}{ y}}
|
|
|
|
|
|
|
|
\func{wxString}{operator $+$}{\param{const wxString\&}{ x}, \param{const char*}{ y}}
|
|
|
|
|
|
|
|
\func{wxString}{operator $+$}{\param{const wxString\&}{ x}, \param{char}{ y}}
|
|
|
|
|
|
|
|
\func{wxString}{operator $+$}{\param{const char*}{ x}, \param{const wxString\&}{ y}}
|
|
|
|
|
1998-05-20 10:25:30 -04:00
|
|
|
\membersection{wxString::operator $+=$}\label{wxstringPlusEqual}
|
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\func{void}{operator $+=$}{\param{const wxString\&}{ str}}
|
|
|
|
|
|
|
|
\func{void}{operator $+=$}{\param{const char*}{ psz}}
|
|
|
|
|
|
|
|
\func{void}{operator $+=$}{\param{char}{ c}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
Concatenation.
|
|
|
|
|
|
|
|
\membersection{wxString::operator []}\label{wxstringoperatorbracket}
|
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\func{char\&}{operator []}{\param{size\_t}{ i}}
|
|
|
|
|
|
|
|
\func{char}{operator []}{\param{size\_t}{ i}}
|
|
|
|
|
|
|
|
\func{char}{operator []}{\param{int}{ i}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
Element extraction.
|
|
|
|
|
|
|
|
\membersection{wxString::operator ()}\label{wxstringoperatorparenth}
|
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\func{wxString}{operator ()}{\param{size\_t}{ start}, \param{size\_t}{ len}}
|
|
|
|
|
|
|
|
Same as Mid (substring extraction).
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\membersection{wxString::operator \cinsert}\label{wxstringoperatorout}
|
1998-07-29 02:51:33 -04:00
|
|
|
|
1999-02-20 17:50:06 -05:00
|
|
|
\func{wxString\&}{operator \cinsert}{\param{const wxString\&}{ str}}
|
1998-07-29 02:51:33 -04:00
|
|
|
|
1999-02-20 17:50:06 -05:00
|
|
|
\func{wxString\&}{operator \cinsert}{\param{const char*}{ psz}}
|
1998-07-29 02:51:33 -04:00
|
|
|
|
1999-02-20 17:50:06 -05:00
|
|
|
\func{wxString\&}{operator \cinsert}{\param{char }{ch}}
|
1998-07-29 02:51:33 -04:00
|
|
|
|
|
|
|
Same as $+=$.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\membersection{wxString::operator \cextract}\label{wxstringoperatorin}
|
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\func{friend istream\&}{operator \cextract}{\param{istream\&}{ is}, \param{wxString\&}{ str}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
Extraction from a stream.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\membersection{wxString::operator const char*}\label{wxstringoperatorconstcharpt}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\constfunc{}{operator const char*}{\void}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
Implicit conversion to a C string.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\membersection{Comparison operators}\label{wxstringComparison}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\func{bool}{operator $==$}{\param{const wxString\&}{ x}, \param{const wxString\&}{ y}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\func{bool}{operator $==$}{\param{const wxString\&}{ x}, \param{const char*}{ t}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\func{bool}{operator $!=$}{\param{const wxString\&}{ x}, \param{const wxString\&}{ y}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\func{bool}{operator $!=$}{\param{const wxString\&}{ x}, \param{const char*}{ t}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\func{bool}{operator $>$}{\param{const wxString\&}{ x}, \param{const wxString\&}{ y}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\func{bool}{operator $>$}{\param{const wxString\&}{ x}, \param{const char*}{ t}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\func{bool}{operator $>=$}{\param{const wxString\&}{ x}, \param{const wxString\&}{ y}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\func{bool}{operator $>=$}{\param{const wxString\&}{ x}, \param{const char*}{ t}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\func{bool}{operator $<$}{\param{const wxString\&}{ x}, \param{const wxString\&}{ y}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\func{bool}{operator $<$}{\param{const wxString\&}{ x}, \param{const char*}{ t}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\func{bool}{operator $<=$}{\param{const wxString\&}{ x}, \param{const wxString\&}{ y}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\func{bool}{operator $<=$}{\param{const wxString\&}{ x}, \param{const char*}{ t}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
\wxheading{Remarks}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
These comparisons are case-sensitive.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
|