Corrected some .tex problems

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1792 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart 1999-02-25 15:07:00 +00:00
parent a994f81b94
commit 40b480c35d
10 changed files with 133 additions and 182 deletions

View File

@ -2,30 +2,6 @@
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}% \setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
\setfooter{\thepage}{}{}{}{}{\thepage}% \setfooter{\thepage}{}{}{}{}{\thepage}%
\pagenumbering{arabic}% \pagenumbering{arabic}%
%
\begin{comment}
\helpignore{\section{Class hierarchy}%
The GUI-specific wxWindows class hierarchy is shown in Figure 5.1.
Many other, non-GUI classes have been omitted.
\vskip 1cm
$$\image{14cm;0cm}{wxclass.ps}$$
\vskip 1cm
\centerline{Figure 5.1: wxWindows class hierarchy}
\newpage}%
\overview{Writing a wxWindows application: a rough guide}{roughguide}
\helponly{
\sethotspotcolour{off}%
\large{
\helpref{Notes on using the reference}{referencenotes}\\
\helpref{Guide to functions}{functions}
\sethotspotcolour{on}%
}}
\end{comment}
\input accel.tex \input accel.tex
\input activevt.tex \input activevt.tex
@ -190,26 +166,26 @@ $$\image{14cm;0cm}{wxclass.ps}$$
\input statbox.tex \input statbox.tex
\input stattext.tex \input stattext.tex
\input statusbr.tex \input statusbr.tex
\input strmbase.tex
\input stream.tex
\input wxstring.tex \input wxstring.tex
\input strlist.tex \input strlist.tex
\input tokenizr.tex \input tokenizr.tex
\input strmbase.tex
\input stream.tex
\input sysclevt.tex \input sysclevt.tex
\input settings.tex \input settings.tex
\input tab.tex \input tab.tex
\input tabctrl.tex \input tabctrl.tex
\input tabevent.tex \input tabevent.tex
\input taskbar.tex \input taskbar.tex
\input tcpclint.tex
\input tcpconn.tex
\input tcpservr.tex
\input tempfile.tex \input tempfile.tex
\input text.tex \input text.tex
\input txtdatob.tex \input txtdatob.tex
\input textdlg.tex \input textdlg.tex
\input txtdrptg.tex \input txtdrptg.tex
\input valtext.tex \input valtext.tex
\input tcpclint.tex
\input tcpconn.tex
\input tcpservr.tex
\input textfile.tex \input textfile.tex
\input thread.tex \input thread.tex
\input time.tex \input time.tex

View File

@ -57,6 +57,12 @@ Reads a 32 bit integer from the stream.
Reads a double (IEEE encoded) from the stream. Reads a double (IEEE encoded) from the stream.
\membersection{wxDataInputStream::ReadLine}
\func{wxString}{wxDataInputStream::ReadLine}{\void}
Reads a line from the stream. A line is a string which ends with \\n or \\r\\n.
\membersection{wxDataInputStream::ReadString} \membersection{wxDataInputStream::ReadString}
\func{wxString}{wxDataInputStream::ReadString}{\void} \func{wxString}{wxDataInputStream::ReadString}{\void}
@ -65,12 +71,6 @@ Reads a string from a stream. Actually, this function first reads a long integer
specifying the length of the string (without the last null character) and then specifying the length of the string (without the last null character) and then
reads the string. reads the string.
\membersection{wxDataInputStream::ReadLine}
\func{wxString}{wxDataInputStream::ReadLine}{\void}
Reads a line from the stream. A line is a string which ends with \\n or \\r\\n.
\section{\class{wxDataOutputStream}}\label{wxdataoutputstream} \section{\class{wxDataOutputStream}}\label{wxdataoutputstream}
This class provides functions that write data types in a This class provides functions that write data types in a
@ -120,13 +120,6 @@ Writes the 32 bit integer {\it i32} to the stream.
Writes the double {\it f} to the stream using the IEEE format. Writes the double {\it f} to the stream using the IEEE format.
\membersection{wxDataOutputStream::WriteString}
\func{void}{wxDataOutputStream::WriteString}{{\param const wxString\& }{string}}
Writes {\it string} to the stream. Actually, this method writes the size of
the string before writing {\it string} itself.
\membersection{wxDataOutputStream::WriteLine} \membersection{wxDataOutputStream::WriteLine}
\func{void}{wxDataOutputStream::WriteLine}{{\param const wxString\& }{string}} \func{void}{wxDataOutputStream::WriteLine}{{\param const wxString\& }{string}}
@ -134,3 +127,10 @@ the string before writing {\it string} itself.
Writes {\it string} as a line. Depending on the operating system, it adds Writes {\it string} as a line. Depending on the operating system, it adds
$\backslash$n or $\backslash$r$\backslash$n. $\backslash$n or $\backslash$r$\backslash$n.
\membersection{wxDataOutputStream::WriteString}
\func{void}{wxDataOutputStream::WriteString}{{\param const wxString\& }{string}}
Writes {\it string} to the stream. Actually, this method writes the size of
the string before writing {\it string} itself.

View File

@ -44,21 +44,21 @@ Returns the last command result.
\func{bool}{ChDir}{\param{const wxString\&}{ dir}} \func{bool}{ChDir}{\param{const wxString\&}{ dir}}
Change the current FTP working directory. Change the current FTP working directory.
Returns TRUE, if successful. Returns TRUE if successful.
\membersection{wxFTP::MkDir} \membersection{wxFTP::MkDir}
\func{bool}{MkDir}{\param{const wxString\&}{ dir}} \func{bool}{MkDir}{\param{const wxString\&}{ dir}}
Create the specified directory in the current FTP working directory. Create the specified directory in the current FTP working directory.
Returns TRUE, if successful. Returns TRUE if successful.
\membersection{wxFTP::RmDir} \membersection{wxFTP::RmDir}
\func{bool}{RmDir}{\param{const wxString\&}{ dir}} \func{bool}{RmDir}{\param{const wxString\&}{ dir}}
Remove the specified directory from the current FTP working directory. Remove the specified directory from the current FTP working directory.
Returns TRUE, if successful. Returns TRUE if successful.
\membersection{wxFTP::Pwd} \membersection{wxFTP::Pwd}
@ -72,8 +72,7 @@ Returns the current FTP working directory.
\func{bool}{Rename}{\param{const wxString\&}{ src}, \param{const wxString\&}{ dst}} \func{bool}{Rename}{\param{const wxString\&}{ src}, \param{const wxString\&}{ dst}}
Rename the specified \it{src} element into \it{dst} Rename the specified \it{src} element to \it{dst}. Returns TRUE if successful.
Returns TRUE, if successful.
% ---------------------------------------------------------------------------- % ----------------------------------------------------------------------------
@ -81,8 +80,7 @@ Returns TRUE, if successful.
\func{bool}{RmFile}{\param{const wxString\&}{ path}} \func{bool}{RmFile}{\param{const wxString\&}{ path}}
Delete the file specified by \it{path}. Delete the file specified by \it{path}. Returns TRUE if successful.
Returns TRUE, if successful.
% ---------------------------------------------------------------------------- % ----------------------------------------------------------------------------

View File

@ -35,24 +35,33 @@ stream buffer can point to another stream.
Destructor. Destructor.
% -----------
% IO function
% -----------
\membersection{wxInputStream::Peek}
\func{char}{Peek}{\void}
Returns the first character in the input queue without removing it.
\membersection{wxInputStream::GetC} \membersection{wxInputStream::GetC}
\func{char}{GetC}{\void} \func{char}{GetC}{\void}
Returns the first character in the input queue and removes it. Returns the first character in the input queue and removes it.
\membersection{wxInputStream::InputStreamBuffer}
\func{wxStreamBuffer*}{InputStreamBuffer}{\void}
Returns the stream buffer associated with the input stream.
\membersection{wxInputStream::LastRead}
\constfunc{size\_t}{LastRead}{\void}
Returns the last number of bytes read.
\membersection{wxInputStream::Peek}
\func{char}{Peek}{\void}
Returns the first character in the input queue without removing it.
\membersection{wxInputStream::Read} \membersection{wxInputStream::Read}
\func{wxInputStream\&}{Read}{\param{void *}{buffer}, \param{size_t}{ size}} \func{wxInputStream\&}{Read}{\param{void *}{buffer}, \param{size\_t}{ size}}
Reads the specified amount of bytes and stores the data in \it{buffer}. Reads the specified amount of bytes and stores the data in \it{buffer}.
@ -75,33 +84,15 @@ The data is read until an error is raised by one of the two streams.
This function returns a reference on the current object, so the user can test This function returns a reference on the current object, so the user can test
any states of the stream right away. any states of the stream right away.
% ------------------
% Position functions
% ------------------
\membersection{wxInputStream::SeekI} \membersection{wxInputStream::SeekI}
\func{off_t}{SeekI}{\param{off_t}{ pos}, \param{wxSeekMode}{ mode = wxFromStart}} \func{off\_t}{SeekI}{\param{off\_t}{ pos}, \param{wxSeekMode}{ mode = wxFromStart}}
Changes the stream current position. Changes the stream current position.
\membersection{wxInputStream::TellI} \membersection{wxInputStream::TellI}
\constfunc{off_t}{TellI}{\void} \constfunc{off\_t}{TellI}{\void}
Returns the current stream position. Returns the current stream position.
% ---------------
% State functions
% ---------------
\membersection{wxInputStream::InputStreamBuffer}
\func{wxStreamBuffer*}{InputStreamBuffer}{\void}
Returns the stream buffer associated with the input stream.
\membersection{wxInputStream::LastRead}
\constfunc{size_t}{LastRead}{\void}
Returns the last number of bytes read.

View File

@ -35,9 +35,16 @@ stream buffer can point to another stream.
Destructor. Destructor.
% ----------- \membersection{wxOutputStream::OutputStreamBuffer}
% IO function
% ----------- \func{wxStreamBuffer *}{OutputStreamBuffer}{\void}
Returns the stream buffer associated with the output stream.
\membersection{wxOutputStream::LastWrite}
\constfunc{size_t}{LastWrite}{\void}
\membersection{wxOutputStream::PutC} \membersection{wxOutputStream::PutC}
\func{void}{PutC}{\param{char}{ c}} \func{void}{PutC}{\param{char}{ c}}
@ -45,6 +52,18 @@ Destructor.
Puts the specified character in the output queue and increments the Puts the specified character in the output queue and increments the
stream position. stream position.
\membersection{wxOutputStream::SeekO}
\func{off_t}{SeekO}{\param{off_t}{ pos}, \param{wxSeekMode}{ mode}}
Changes the stream current position.
\membersection{wxOutputStream::TellO}
\constfunc{off_t}{TellO}{\void}
Returns the current stream position.
\membersection{wxOutputStream::Write} \membersection{wxOutputStream::Write}
\func{wxOutputStream\&}{Write}{\param{const void *}{buffer}, \param{size_t}{ size}} \func{wxOutputStream\&}{Write}{\param{const void *}{buffer}, \param{size_t}{ size}}
@ -61,31 +80,3 @@ Reads data from the specified input stream and stores them
in the current stream. The data is read until an error is raised in the current stream. The data is read until an error is raised
by one of the two streams. by one of the two streams.
% ------------------
% Position functions
% ------------------
\membersection{wxOutputStream::SeekO}
\func{off_t}{SeekO}{\param{off_t}{ pos}, \param{wxSeekMode}{ mode}}
Changes the stream current position.
\membersection{wxOutputStream::TellO}
\constfunc{off_t}{TellO}{\void}
Returns the current stream position.
% ---------------
% State functions
% ---------------
\membersection{wxOutputStream::OutputStreamBuffer}
\func{wxStreamBuffer *}{OutputStreamBuffer}{\void}
Returns the stream buffer associated with the output stream.
\membersection{wxOutputStream::LastWrite}
\constfunc{size_t}{LastWrite}{\void}

View File

@ -49,8 +49,36 @@ This function returns the last error.
\twocolitem{{\bf wxStream_READ_ERR}}{A generic error occured on the last read call.} \twocolitem{{\bf wxStream_READ_ERR}}{A generic error occured on the last read call.}
\end{twocollist} \end{twocollist}
\membersection{wxStreamBase::OnSysRead}\label{wxstreambaseonsysread}
\func{size\_t}{OnSysRead}{\param{void*}{ buffer}, \param{size\_t}{ bufsize}}
Internal function. It is called when the stream buffer needs a buffer of the
specified size. It should return the size that was actually read.
\membersection{wxStreamBase::OnSysSeek}
\func{off\_t}{OnSysSeek}{\param{off\_t}{ pos}, \param{wxSeekMode}{ mode}}
Internal function. It is called when the stream buffer needs to change the
current position in the stream. See \helpref{wxStreamBuffer::Seek}{wxstreambufferseek}
\membersection{wxStreamBase::OnSysTell}
\constfunc{off\_t}{OnSysTell}{\void}
Internal function. Is is called when the stream buffer needs to know the
real position in the stream.
\membersection{wxStreamBase::OnSysWrite}
\func{size\_t}{OnSysWrite}{\param{void *}{buffer}, \param{size\_t}{ bufsize}}
See \helpref{OnSysRead}{wxstreambaseonsysread}.
\membersection{wxStreamBase::StreamSize} \membersection{wxStreamBase::StreamSize}
\constfunc{size_t}{StreamSize}{\void}
\constfunc{size\_t}{StreamSize}{\void}
This function returns the size of the stream. For example, for a file it is the size of This function returns the size of the stream. For example, for a file it is the size of
the file). the file).
@ -59,34 +87,8 @@ the file).
There are streams which do not have size by definition, such as socket streams. There are streams which do not have size by definition, such as socket streams.
In that cases, StreamSize returns an invalid size represented by In that cases, StreamSize returns an invalid size represented by
\begin{verbatim} \begin{verbatim}
~(size_t)0 ~(size_t)0
\end{verbatim} \end{verbatim}
\membersection{wxStreamBase::OnSysRead}\label{wxstreambaseonsysread}
\func{size_t}{OnSysRead}{\param{void*}{ buffer}, \param{size_t}{ bufsize}}
Internal function. It is called when the stream buffer needs a buffer of the
specified size. It should return the size that was actually read.
\membersection{wxStreamBase::OnSysWrite}
\func{size_t}{OnSysWrite}{\param{void *}{buffer}, \param{size_t}{ bufsize}}
See \helpref{OnSysRead}{wxstreambaseonsysread}.
\membersection{wxStreamBase::OnSysSeek}
\func{off_t}{OnSysSeek}{\param{off_t}{ pos}, \param{wxSeekMode}{ mode}}
Internal function. It is called when the stream buffer needs to change the
current position in the stream. See \helpref{wxStreamBuffer::Seek}{wxstreambufferseek}
\membersection{wxStreamBase::OnSysTell}
\constfunc{off_t}{OnSysTell}{\void}
Internal function. Is is called when the stream buffer needs to know the
real position in the stream.

View File

@ -35,7 +35,7 @@ This chapter contains a selection of topic overviews.
\input tvalidat.tex \input tvalidat.tex
\input texpr.tex \input texpr.tex
\input tgrid.tex \input tgrid.tex
\input tstring.tex %\input tstring.tex
\input tdnd.tex \input tdnd.tex
\input tthreads.tex \input tthreads.tex
\input tfile.tex \input tfile.tex

View File

@ -33,34 +33,34 @@ finally, C++ even has one (std::string) in standard. Why use wxString then?
There are several advantages: There are several advantages:
\begin{enumerate}\itemsep=0pt \begin{enumerate}\itemsep=0pt
\item {\bf Efficiency} {This class was made to be as efficient as possible: both \item {\bf Efficiency} This class was made to be as efficient as possible: both
in terms of size (each wxString objects takes exactly the same place as {\it in terms of size (each wxString objects takes exactly the same place as {\it
char *} pointer, \helpref{reference counting}{wxstringrefcount}) and speed. char *} pointer, \helpref{reference counting}{wxstringrefcount}) and speed.
It also provides performance \helpref{statistics gathering code}{wxstringtuning} It also provides performance \helpref{statistics gathering code}{wxstringtuning}
which may be enabled to fine tune the memory allocation strategy for your which may be enabled to fine tune the memory allocation strategy for your
particular application - and the gain might be quite big.} particular application - and the gain might be quite big.
\item {\bf Compatibility} {This class tries to combine almost full compatibility \item {\bf Compatibility} This class tries to combine almost full compatibility
with the old wxWindows 1.xx wxString class, some reminiscence to MFC CString with the old wxWindows 1.xx wxString class, some reminiscence to MFC CString
class and 90\% of functionality of std::string class.} class and 90\% of functionality of std::string class.
\item {\bf Rich set of functions} {Some of the functions present in wxString are \item {\bf Rich set of functions} Some of the functions present in wxString are
very useful but don't exist in most of other string classes: for example, very useful but don't exist in most of other string classes: for example,
\helpref{AfterFirst}{wxstringafterfirst}, \helpref{AfterFirst}{wxstringafterfirst},
\helpref{BeforLast}{wxstringbeforlast}, \helpref{operator<<}{wxstringoperator} \helpref{BeforLast}{wxstringbeforlast}, \helpref{operator<<}{wxstringoperator}
or \helpref{Printf}{wxstringprintf}. Of course, all the standard string or \helpref{Printf}{wxstringprintf}. Of course, all the standard string
operations are supported as well.} operations are supported as well.
\item {\bf UNICODE} {In this release, wxString only supports construction from \item {\bf UNICODE} In this release, wxString only supports construction from
an UNICODE string, but in the next one it will be capable of also storing its an UNICODE string, but in the next one it will be capable of also storing its
internal data in either ASCII or UNICODE format.} internal data in either ASCII or UNICODE format.
\item {\bf Used by wxWindows} {And, of course, this class is used everywhere \item {\bf Used by wxWindows} And, of course, this class is used everywhere
inside wxWindows so there is no performance loss which would result from inside wxWindows so there is no performance loss which would result from
conversions of objects of any other string class (including std::string) to conversions of objects of any other string class (including std::string) to
wxString internally by wxWindows.} wxString internally by wxWindows.
\end{enumerate} \end{enumerate}
However, there are several problems as well. The most important one is probably However, there are several problems as well. The most important one is probably
that there are often several functions to do exactly the same thing: for that there are often several functions to do exactly the same thing: for
example, to get the length of the string either one of example, to get the length of the string either one of
\helpref{length()}{wxstringlength}, \helpref{Len()}{wxstringlen} or \helpref{length()}{wxstringlength}, \helpref{Len()}{wxstringlen} or
\helpref{Length()}{wxstringLength} may be used. The first function, as almost \helpref{Length()}{wxstringLength} may be used. The first function, as almost
all the other functions in lowercase, is std::string compatible. The second one all the other functions in lowercase, is std::string compatible. The second one
is "native" wxString version and the last one is wxWindows 1.xx way. So the is "native" wxString version and the last one is wxWindows 1.xx way. So the
@ -77,15 +77,14 @@ In the situations when there is no correspondinw std::string function, please
try to use the new wxString methods and not the old wxWindows 1.xx variants try to use the new wxString methods and not the old wxWindows 1.xx variants
which are deprecated and risk to disappear in future versions. which are deprecated and risk to disappear in future versions.
\subsection{Some advices about using wxString}\label{wxstringadvices} \subsection{Some advice about using wxString}\label{wxstringadvices}
Probably main trap with using this class is the implicit conversion operator to Probably the main trap with using this class is the implicit conversion operator to
{\it const char *}. It is advised that you use \helpref{c\_str()}{wxstringcstr} {\it const char *}. It is advised that you use \helpref{c\_str()}{wxstringcstr}
instead of it to clearly indicate when the conversion is done. Specifically, the instead of it to clearly indicate when the conversion is done. Specifically, the
danger of this implicit conversion may be seen in the following code fragment: danger of this implicit conversion may be seen in the following code fragment:
\begin{verbatim} \begin{verbatim}
// this function converts the input string to uppercase, output it to the screen // this function converts the input string to uppercase, output it to the screen
// and returns the result // and returns the result
const char *SayHELLO(const wxString& input) const char *SayHELLO(const wxString& input)
@ -96,19 +95,18 @@ const char *SayHELLO(const wxString& input)
return output; return output;
} }
\end{verbatim} \end{verbatim}
There are two nasty bugs in these three lines. First of them is in the call to There are two nasty bugs in these three lines. First of them is in the call to the
{\it printf()} function. Although the implicit conversion to C strings is applied {\it printf()} function. Although the implicit conversion to C strings is applied
automatically by the compiler in case of automatically by the compiler in the case of
\begin{verbatim} \begin{verbatim}
puts(output); puts(output);
\end{verbatim} \end{verbatim}
because the argument of {\it puts()} is known to be of the type {\it const char because the argument of {\it puts()} is known to be of the type {\it const char *},
*}, this is {\bf not} done for {\it printf()} which is a function with variable this is {\bf not} done for {\it printf()} which is a function with variable
number of arguments (and whose arguments are of unknown types). So this call may number of arguments (and whose arguments are of unknown types). So this call may
do anything at all (including displaying the correct string on screen), although do anything at all (including displaying the correct string on screen), although
the most likely result is a program crash. The solution is to use the most likely result is a program crash. The solution is to use
@ -139,7 +137,7 @@ intuitive behaviour (like strncpy() which doesn't always terminate the resulting
string with a NUL) and are in general not very safe (passing NULL to them will string with a NUL) and are in general not very safe (passing NULL to them will
probably lead to program crash). Moreover, some of very useful functions are not probably lead to program crash). Moreover, some of very useful functions are not
standard at all. This is why in addition to all wxString functions, there are standard at all. This is why in addition to all wxString functions, there are
also a few of global string functions which try to correct these problems: also a few of global string functions which try to correct these problems:
\helpref{IsEmpty()}{isempty} verifies whether the string is empty (returning \helpref{IsEmpty()}{isempty} verifies whether the string is empty (returning
TRUE for NULL pointers), \helpref{Strlen()}{strlen} also handles NULLs correctly TRUE for NULL pointers), \helpref{Strlen()}{strlen} also handles NULLs correctly
and returns 0 for them and \helpref{Stricmp()}{stricmp} is just a and returns 0 for them and \helpref{Stricmp()}{stricmp} is just a
@ -148,13 +146,13 @@ known either as stricmp() or strcasecmp() on different platforms.
There is another class which might be useful when working with wxString: There is another class which might be useful when working with wxString:
\helpref{wxStringTokenizer}{wxstringtokenizer}. It is helpful when a string must \helpref{wxStringTokenizer}{wxstringtokenizer}. It is helpful when a string must
be broken into tokens and replaces advatageously the standard C library {\it be broken into tokens and replaces the standard C library {\it
strtok()} function. strtok()} function.
And the very last string related class is \helpref{wxArrayString}{wxarray}: it And the very last string related class is \helpref{wxArrayString}{wxarray}: it
is just a version of "template" dynamic array class which is specialized to work is just a version of the "template" dynamic array class which is specialized to work
with strings. Please note that this class is specially optimized (it uses its with strings. Please note that this class is specially optimized (it uses its
knowledge of internal structure of wxString) for storing strigns and so it is knowledge of internal structure of wxString) for storing strings and so it is
vastly better from performance point of view than wxObjectArray of wxString. vastly better from performance point of view than wxObjectArray of wxString.
\subsection{Reference counting and why you shouldn't care about it}\label{wxstringrefcount} \subsection{Reference counting and why you shouldn't care about it}\label{wxstringrefcount}
@ -189,7 +187,7 @@ of array subscript operator for this reasons. Please note that
\helpref{at()}{wxstringat} method has the same problem as subscript operator in \helpref{at()}{wxstringat} method has the same problem as subscript operator in
this situation and so using it is not really better. Also note that if all this situation and so using it is not really better. Also note that if all
string arguments to your functions are passed as {\it const wxString\&} (see the string arguments to your functions are passed as {\it const wxString\&} (see the
section \helpref{Some advices}{wxstringadvices}) this situation will almost section \helpref{Some advice}{wxstringadvices}) this situation will almost
never arise because for constant references the correct operator is called automatically. never arise because for constant references the correct operator is called automatically.
\subsection{Tuning wxString for your application}\label{wxstringtuning} \subsection{Tuning wxString for your application}\label{wxstringtuning}
@ -207,7 +205,6 @@ expensive operation) too often as when, for example, a string is constructed by
subsequently adding one character at a time to it, as for example in: subsequently adding one character at a time to it, as for example in:
\begin{verbatim} \begin{verbatim}
// delete all vowels from the string // delete all vowels from the string
wxString DeleteAllVowels(const wxString& original) wxString DeleteAllVowels(const wxString& original)
{ {
@ -222,10 +219,9 @@ wxString DeleteAllVowels(const wxString& original)
return result; return result;
} }
\end{verbatim} \end{verbatim}
This is a quite common situation and not allocating extra memory at all would This is quite a common situation and not allocating extra memory at all would
lead to very bad performance in this case because there would be as many memory lead to very bad performance in this case because there would be as many memory
(re)allocations as there are consonants in the original string. Allocating too (re)allocations as there are consonants in the original string. Allocating too
much extra memory would help to improve the speed in this situation, but due to much extra memory would help to improve the speed in this situation, but due to

View File

@ -1683,14 +1683,12 @@ Sets the window's cursor.
\docparam{cursor}{Specifies the cursor that the window should normally display.} \docparam{cursor}{Specifies the cursor that the window should normally display.}
\begin{comment} %\wxheading{Remarks}
\wxheading{Remarks} %
%Under Windows, you sometimes need to call ::wxSetCursor in addition to this
Under Windows, you sometimes need to call ::wxSetCursor in addition to this %function if you want the cursor to change immediately, because under Windows,
function if you want the cursor to change immediately, because under Windows, %wxWindows only sets the global cursor when it detects mouse movement.
wxWindows only sets the global cursor when it detects mouse movement. %
\end{comment
\wxheading{See also} \wxheading{See also}
\helpref{::wxSetCursor}{wxsetcursor}, \helpref{wxCursor}{wxcursor} \helpref{::wxSetCursor}{wxsetcursor}, \helpref{wxCursor}{wxcursor}

View File

@ -1,10 +1,10 @@
\section{\class{wxString}}\label{wxstring} \section{\class{wxString}}\label{wxstring}
wxString is a class representing a character string. Please see wxString wxString is a class representing a character string. Please see the
\helpref{overview}{wxstringoverview} for more information about it. As explained \helpref{wxString overview}{wxstringoverview} for more information about it. As explained
there, wxStrign implements about 90\% of methods of std::string class (iterators there, wxString implements about 90\% of methods of the std::string class (iterators
are not supported and so all methods which use them are not supported neither), are not supported, nor all methods which use them).
but they are not documented here - please see any source of STL documentation. These standard functions are not documented in this manual so please see the STL documentation.
The behaviour of all these functions is identical to the behaviour described The behaviour of all these functions is identical to the behaviour described
there. there.
@ -126,7 +126,7 @@ lower case and leave the original string unchanged.
\membersection{Searching and replacing} \membersection{Searching and replacing}
These functions replace the standard {\it strchr()} and {\it strstr()} These functions replace the standard {\it strchr()} and {\it strstr()}
functions. functions.
\helpref{Find}{wxstringfind}\\ \helpref{Find}{wxstringfind}\\
@ -139,7 +139,7 @@ insertion operators exist (for basic types only).
\helpref{Printf}{wxstringprintf}\\ \helpref{Printf}{wxstringprintf}\\
\helpref{PrintfV}{wxstringprintfv}\\ \helpref{PrintfV}{wxstringprintfv}\\
\helpref{operator \cinsert}{wxstringoperatorout) \helpref{operator \cinsert}{wxstringoperatorout}
\membersection{Memory management} \membersection{Memory management}
@ -962,4 +962,3 @@ Implicit conversion to a C string.
These comparisons are case-sensitive. These comparisons are case-sensitive.