\func{wxString}{wxFileNameFromPath}{\param{const wxString\& }{path}}
-Returns a temporary pointer to the filename for a full path.
-Copy this pointer for long-term use.
+\func{char*}{wxFileNameFromPath}{\param{char* }{path}}
+
+Returns the filename for a full path. The second form returns a pointer to
+temporary storage that should not be deallocated.
\membersection{::wxFindFirstFile}\label{wxfindfirstfile}
-\func{wxString}{wxFindFirstFile}{\param{const wxString\& }{spec}, \param{int}{ flags = 0}}
+\func{wxString}{wxFindFirstFile}{\param{const char*}{spec}, \param{int}{ flags = 0}}
This function does directory searching; returns the first file
-that matches the path {\it spec}, or NULL. Use \helpref{wxFindNextFile}{wxfindnextfile} to
+that matches the path {\it spec}, or the empty string. Use \helpref{wxFindNextFile}{wxfindnextfile} to
get the next matching file.
{\it spec} may contain wildcards.
{\it flags} is reserved for future use.
-The returned filename is a pointer to static memory so should
-not be freed.
-
For example:
\begin{verbatim}
wxString f = wxFindFirstFile("/home/project/*.*");
- while (f)
+ while ( !f.IsEmpty() )
{
...
f = wxFindNextFile();
\func{wxString}{wxPathOnly}{\param{const wxString\& }{path}}
-Returns a temporary pointer to the directory part of the filename. Copy this
-pointer for long-term use.
+Returns the directory part of the filename.
\membersection{::wxUnix2DosFilename}
\membersection{::wxGetWorkingDirectory}
-\func{wxString}{wxGetWorkingDirectory}{\param{const wxString\& }{buf=NULL}, \param{int }{sz=1000}}
+\func{wxString}{wxGetWorkingDirectory}{\param{char*}{buf=NULL}, \param{int }{sz=1000}}
This function is obsolete: use \helpref{wxGetCwd}{wxgetcwd} instead.
\membersection{::wxGetTempFileName}
-\func{wxString}{wxGetTempFileName}{\param{const wxString\& }{prefix}, \param{const wxString\& }{buf=NULL}}
+\func{char*}{wxGetTempFileName}{\param{const wxString\& }{prefix}, \param{char* }{buf=NULL}}
Makes a temporary filename based on {\it prefix}, opens and closes the file,
and places the name in {\it buf}. If {\it buf} is NULL, new store
strings pointed to by these parameters will be overwritten in any case (if the pointers
are not NULL).
+\membersection{::wxTransferFileToStream}\label{wxtransferfiletostream}
+
+\func{bool}{wxTransferFileToStream}{\param{const wxString\& }{filename}, \param{ostream\& }{stream}}
+
+Copies the given file to {\it stream}. Useful when converting an old application to
+use streams (within the document/view framework, for example).
+
+Use of this function requires the file wx\_doc.h to be included.
+
+\membersection{::wxTransferStreamToFile}\label{wxtransferstreamtofile}
+
+\func{bool}{wxTransferStreamToFile}{\param{istream\& }{stream} \param{const wxString\& }{filename}}
+
+Copies the given stream to the file {\it filename}. Useful when converting an old application to
+use streams (within the document/view framework, for example).
+
+Use of this function requires the file wx\_doc.h to be included.
+
\section{String functions}
\membersection{::copystring}
#define wxStringEq(s1, s2) (s1 && s2 && (strcmp(s1, s2) == 0))
\end{verbatim}
-\membersection{::wxTransferFileToStream}\label{wxtransferfiletostream}
+\membersection{::IsEmpty}\label{isempty}
-\func{bool}{wxTransferFileToStream}{\param{const wxString\& }{filename}, \param{ostream\& }{stream}}
+\func{bool}{IsEmpty}{\param{const char *}{ p}}
-Copies the given file to {\it stream}. Useful when converting an old application to
-use streams (within the document/view framework, for example).
+Returns TRUE if the string is empty, FALSE otherwise. It is safe to pass NULL
+pointer to this function and it will return TRUE for it.
-Use of this function requires the file wx\_doc.h to be included.
+\membersection{::Stricmp}\label{stricmp}
-\membersection{::wxTransferStreamToFile}\label{wxtransferstreamtofile}
+\func{int}{Stricmp}{\param{const char *}{p1}, \param{const char *}{p2}}
-\func{bool}{wxTransferStreamToFile}{\param{istream\& }{stream} \param{const wxString\& }{filename}}
+Returns a negative value, 0, or positive value if {\it p1} is less than, equal
+to or greater than {\it p2}. The comparison is case-insensitive.
-Copies the given stream to the file {\it filename}. Useful when converting an old application to
-use streams (within the document/view framework, for example).
+This function complements the standard C function {\it strcmp()} which performs
+case-sensitive comparison.
-Use of this function requires the file wx\_doc.h to be included.
+\membersection{::Strlen}\label{strlen}
+
+\func{size\_t}{Strlen}{\param{const char *}{ p}}
+
+This is a safe version of standard function {\it strlen()}: it does exactly the
+same thing (i.e. returns the length of the string) except that it returns 0 if
+{\it p} is the NULL pointer.
+
+\membersection{::wxGetTranslation}\label{wxgettranslation}
+
+\func{const char *}{wxGetTranslation}{\param{const char * }{str}}
+
+This function returns the translation of string {\it str} in the current
+\helpref{locale}{wxlocale}. If the string is not found in any of the loaded
+message catalogs (see \helpref{i18n overview}{internationalization}), the
+original string is returned. In debug build, an error message is logged - this
+should help to find the strings which were not yet translated. As this function
+is used very often, an alternative syntax is provided: the \_() macro is
+defined as wxGetTranslation().
\section{Dialog functions}\label{dialogfunctions}
\membersection{::wxFileSelector}\label{wxfileselector}
-\func{wxString}{wxFileSelector}{\param{const wxString\& }{message}, \param{const wxString\& }{default\_path = NULL},\\
- \param{const wxString\& }{default\_filename = NULL}, \param{const wxString\& }{default\_extension = NULL},\\
- \param{const wxString\& }{wildcard = ``*.*''}, \param{int }{flags = 0}, \param{wxWindow *}{parent = NULL},\\
+\func{wxString}{wxFileSelector}{\param{const wxString\& }{message}, \param{const wxString\& }{default\_path = ""},\\
+ \param{const wxString\& }{default\_filename = ""}, \param{const wxString\& }{default\_extension = ""},\\
+ \param{const wxString\& }{wildcard = ``*.*''}, \param{int }{flags = 0}, \param{wxWindow *}{parent = ""},\\
\param{int}{ x = -1}, \param{int}{ y = -1}}
Pops up a file selector box. In Windows, this is the common file selector
dialog. In X, this is a file selector box with somewhat less functionality.
The path and filename are distinct elements of a full file pathname.
-If path is NULL, the current directory will be used. If filename is NULL,
+If path is empty, the current directory will be used. If filename is empty,
no default filename will be supplied. The wildcard determines what files
are displayed in the file selector, and file extension supplies a type
extension for the required filename. Flags may be a combination of wxOPEN,
"BMP files (*.bmp) | *.bmp | GIF files (*.gif) | *.gif"
\end{verbatim}
-The application must check for a NULL return value (the user pressed
+The application must check for an empty return value (the user pressed
Cancel). For example:
\begin{verbatim}
-const wxString\& s = wxFileSelector("Choose a file to open");
+const wxString& s = wxFileSelector("Choose a file to open");
if (s)
{
...
}
\end{verbatim}
-Remember that the returned pointer is temporary and should be copied
-if other wxWindows calls will be made before the value is to be used.
-
\wxheading{Include files}
<wx/filedlg.h>
Pop up a dialog box with title set to {\it caption}, message {\it message}, and a
\rtfsp{\it default\_value}. The user may type in text and press OK to return this text,
-or press Cancel to return NULL.
+or press Cancel to return the empty string.
If {\it centre} is TRUE, the message text (which may include new line characters)
is centred; if FALSE, the message is left-justified.
Pops up a dialog box containing a message, OK/Cancel buttons and a single-selection
listbox. The user may choose an item and press OK to return a string or
-Cancel to return NULL.
+Cancel to return the empty string.
{\it choices} is an array of {\it n} strings for the listbox.
<wx/memory.h>
+\membersection{::wxUsleep}\label{wxusleep}
+
+\func{void}{wxUsleep}{\param{unsigned long}{ milliseconds}}
+
+Sleeps for the specified number of milliseconds. Notice that usage of this
+function is encouraged instead of calling usleep(3) directly because the
+standard usleep() function is not MT safe.
+
+\wxheading{Include files}
+
+<wx/utils.h>
+
\membersection{::wxWriteResource}\label{wxwriteresource}
\func{bool}{wxWriteResource}{\param{const wxString\& }{section}, \param{const wxString\& }{entry},