X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0e10e38d8b4405625c3687bdfe6cb315874d1d70..daf5b37afdda9e8ab7f909e01ffd6387219a80ea:/docs/latex/wx/regex.tex

diff --git a/docs/latex/wx/regex.tex b/docs/latex/wx/regex.tex
index 0a6f55075a..59026f0d71 100644
--- a/docs/latex/wx/regex.tex
+++ b/docs/latex/wx/regex.tex
@@ -6,7 +6,7 @@
 %% Created:     14.07.01
 %% RCS-ID:      $Id$
 %% Copyright:   (c) 2001 Vadim Zeitlin
-%% License:     wxWidgets license
+%% License:     wxWindows license
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 \section{\class{wxRegEx}}\label{wxregex}
@@ -118,6 +118,10 @@ printf("text now contains %u hidden addresses", count);
 
 <wx/regex.h>
 
+\wxheading{Library}
+
+\helpref{wxBase}{librarieslist}
+
 \latexignore{\rtfignore{\wxheading{Members}}}
 
 \membersection{wxRegEx::wxRegEx}\label{wxregexwxregex}
@@ -163,7 +167,7 @@ May only be called after successful call to \helpref{Matches()}{wxregexmatches}
 and only if {\tt wxRE\_NOSUB} was {\bf not} used in 
 \helpref{Compile()}{wxregexcompile}.
 
-Returns {\tt false} if no match or if an error occured.
+Returns {\tt false} if no match or if an error occurred.
 
 \constfunc{wxString}{GetMatch}{\param{const wxString\& }{text}, \param{size\_t }{index = 0}}
 
@@ -188,10 +192,24 @@ and only if {\tt wxRE\_NOSUB} was {\bf not} used.
 
 \constfunc{bool}{Matches}{\param{const wxChar* }{text}, \param{int }{flags = 0}}
 
+\constfunc{bool}{Matches}{\param{const wxChar* }{text}, \param{int }{flags}, \param{size\_t }{len}}
+
+\constfunc{bool}{Matches}{\param{const wxString\& }{text}, \param{int }{flags = 0}}
+
 Matches the precompiled regular expression against the string {\it text},
 returns {\tt true} if matches and {\tt false} otherwise.
 
-Flags may be combination of {\tt wxRE\_NOTBOL} and {\tt wxRE\_NOTEOL}.
+{\it Flags} may be combination of {\tt wxRE\_NOTBOL} and {\tt wxRE\_NOTEOL}.
+
+Some regex libraries assume that the text given is null terminated, while
+others require the length be given as a separate parameter. Therefore for
+maximum portability assume that {\it text} cannot contain embedded nulls.
+
+When the {\it Matches(const wxChar *text, int flags = 0)} form is used,
+a {\it wxStrlen()} will be done internally if the regex library requires the
+length. When using {\it Matches()} in a loop
+the {\it Matches(text, flags, len)} form can be used instead, making it
+possible to avoid a {\it wxStrlen()} inside the loop.
 
 May only be called after successful call to \helpref{Compile()}{wxregexcompile}.
 
