fixed broken links to string functions

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10536 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2001-06-11 15:29:34 +00:00
parent d9dd875f00
commit 7ae8ee141c
2 changed files with 37 additions and 32 deletions

View File

@@ -461,15 +461,34 @@ if successful, FALSE otherwise.
Makes a copy of the string {\it s} using the C++ new operator, so it can be Makes a copy of the string {\it s} using the C++ new operator, so it can be
deleted with the {\it delete} operator. deleted with the {\it delete} operator.
\membersection{::wxIsEmpty}\label{wxisempty}
\func{bool}{IsEmpty}{\param{const char *}{ p}}
Returns {\tt TRUE} if the pointer is either {\tt NULL} or points to an empty
string, {\tt FALSE} otherwise.
\membersection{::wxStricmp}\label{wxstricmp}
\func{int}{Stricmp}{\param{const char *}{p1}, \param{const char *}{p2}}
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.
This function complements the standard C function {\it strcmp()} which performs
case-sensitive comparison.
\membersection{::wxStringMatch} \membersection{::wxStringMatch}
\func{bool}{wxStringMatch}{\param{const wxString\& }{s1}, \param{const wxString\& }{s2},\\ \func{bool}{wxStringMatch}{\param{const wxString\& }{s1}, \param{const wxString\& }{s2},\\
\param{bool}{ subString = TRUE}, \param{bool}{ exact = FALSE}} \param{bool}{ subString = TRUE}, \param{bool}{ exact = FALSE}}
Returns TRUE if the substring {\it s1} is found within {\it s2}, Returns {\tt TRUE} if the substring {\it s1} is found within {\it s2},
ignoring case if {\it exact} is FALSE. If {\it subString} is FALSE, ignoring case if {\it exact} is FALSE. If {\it subString} is {\tt FALSE},
no substring matching is done. no substring matching is done.
This function is obsolete, use \helpref{wxString::Find}{wxstringfind} instead.
\membersection{::wxStringEq}\label{wxstringeq} \membersection{::wxStringEq}\label{wxstringeq}
\func{bool}{wxStringEq}{\param{const wxString\& }{s1}, \param{const wxString\& }{s2}} \func{bool}{wxStringEq}{\param{const wxString\& }{s1}, \param{const wxString\& }{s2}}
@@ -480,30 +499,15 @@ A macro defined as:
#define wxStringEq(s1, s2) (s1 && s2 && (strcmp(s1, s2) == 0)) #define wxStringEq(s1, s2) (s1 && s2 && (strcmp(s1, s2) == 0))
\end{verbatim} \end{verbatim}
\membersection{::IsEmpty}\label{isempty} This function is obsolete, use \helpref{wxString}{wxstring} instead.
\func{bool}{IsEmpty}{\param{const char *}{ p}} \membersection{::wxStrlen}\label{wxstrlen}
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.
\membersection{::Stricmp}\label{stricmp}
\func{int}{Stricmp}{\param{const char *}{p1}, \param{const char *}{p2}}
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.
This function complements the standard C function {\it strcmp()} which performs
case-sensitive comparison.
\membersection{::Strlen}\label{strlen}
\func{size\_t}{Strlen}{\param{const char *}{ p}} \func{size\_t}{Strlen}{\param{const char *}{ p}}
This is a safe version of standard function {\it strlen()}: it does exactly the 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 same thing (i.e. returns the length of the string) except that it returns 0 if
{\it p} is the NULL pointer. {\it p} is the {\tt NULL} pointer.
\membersection{::wxGetTranslation}\label{wxgettranslation} \membersection{::wxGetTranslation}\label{wxgettranslation}

View File

@@ -131,18 +131,19 @@ variables.
\subsection{Other string related functions and classes} \subsection{Other string related functions and classes}
As most programs use character strings, the standard C library provides quite a As most programs use character strings, the standard C library provides quite
few functions to work with them. Unfortunately, some of them have rather a few functions to work with them. Unfortunately, some of them have rather
counter-intuitive behaviour (like strncpy() which doesn't always terminate the resulting counter-intuitive behaviour (like strncpy() which doesn't always terminate the
string with a NULL) and are in general not very safe (passing NULL to them will resulting string with a NULL) and are in general not very safe (passing NULL
probably lead to program crash). Moreover, some very useful functions are not to them will probably lead to program crash). Moreover, some very useful
standard at all. This is why in addition to all wxString functions, there are functions are not standard at all. This is why in addition to all wxString
also a few global string functions which try to correct these problems: functions, there are also a few global string functions which try to correct
\helpref{wxIsEmpty()}{wxisempty} verifies whether the string is empty (returning these problems: \helpref{wxIsEmpty()}{wxisempty} verifies whether the string
TRUE for NULL pointers), \helpref{wxStrlen()}{wxstrlen} also handles NULLs correctly is empty (returning {\tt TRUE} for {\tt NULL| pointers),
and returns 0 for them and \helpref{wxStricmp()}{wxstricmp} is just a \helpref{wxStrlen()}{wxstrlen} also handles NULLs correctly and returns 0 for
platform-independent version of case-insensitive string comparison function them and \helpref{wxStricmp()}{wxstricmp} is just a platform-independent
known either as stricmp() or strcasecmp() on different platforms. version of case-insensitive string comparison function known either as
stricmp() or strcasecmp() on different platforms.
The {\tt <wx/string.h>} header also defines \helpref{wxSnprintf}{wxsnprintf} The {\tt <wx/string.h>} header also defines \helpref{wxSnprintf}{wxsnprintf}
and \helpref{wxVsnprintf}{wxvsnprintf} functions which should be used instead and \helpref{wxVsnprintf}{wxvsnprintf} functions which should be used instead