summaryrefslogtreecommitdiffstats
path: root/doc/man/man3/tqregexp.3qt
diff options
context:
space:
mode:
Diffstat (limited to 'doc/man/man3/tqregexp.3qt')
-rw-r--r--doc/man/man3/tqregexp.3qt52
1 files changed, 26 insertions, 26 deletions
diff --git a/doc/man/man3/tqregexp.3qt b/doc/man/man3/tqregexp.3qt
index e0aa9815a..212a008d4 100644
--- a/doc/man/man3/tqregexp.3qt
+++ b/doc/man/man3/tqregexp.3qt
@@ -22,7 +22,7 @@ All the functions in this class are reentrant when TQt is built with thread supp
.BI "\fBQRegExp\fR ()"
.br
.ti -1c
-.BI "\fBQRegExp\fR ( const TQString & pattern, bool caseSensitive = TRUE, bool wildcard = FALSE )"
+.BI "\fBQRegExp\fR ( const TQString & pattern, bool caseSensitive = true, bool wildcard = false )"
.br
.ti -1c
.BI "\fBQRegExp\fR ( const QRegExp & rx )"
@@ -73,7 +73,7 @@ All the functions in this class are reentrant when TQt is built with thread supp
.BI "bool \fBexactMatch\fR ( const TQString & str ) const"
.br
.ti -1c
-.BI "int match ( const TQString & str, int index = 0, int * len = 0, bool indexIsStart = TRUE ) const \fI(obsolete)\fR"
+.BI "int match ( const TQString & str, int index = 0, int * len = 0, bool indexIsStart = true ) const \fI(obsolete)\fR"
.br
.ti -1c
.BI "int \fBsearch\fR ( const TQString & str, int offset = 0, CaretMode caretMode = CaretAtZero ) const"
@@ -291,11 +291,11 @@ QRegExp's quantifiers are the same as Perl's greedy quantifiers. Non-greedy matc
.br
QRegExp rx( "ro+m" );
.br
- rx.setMinimal( TRUE );
+ rx.setMinimal( true );
.br
.fi
.PP
-The equivalent of Perl's \fC/i\fR option is setCaseSensitive(FALSE).
+The equivalent of Perl's \fC/i\fR option is setCaseSensitive(false).
.PP
Perl's \fC/g\fR option can be emulated using a loop.
.PP
@@ -465,13 +465,13 @@ To imitate the matching of a shell we can use wildcard mode.
.br
QRegExp rx( "*.html" ); // invalid regexp: * doesn't quantify anything
.br
- rx.setWildcard( TRUE ); // now it's a valid wildcard regexp
+ rx.setWildcard( true ); // now it's a valid wildcard regexp
.br
- rx.exactMatch( "index.html" ); // returns TRUE
+ rx.exactMatch( "index.html" ); // returns true
.br
- rx.exactMatch( "default.htm" ); // returns FALSE
+ rx.exactMatch( "default.htm" ); // returns false
.br
- rx.exactMatch( "readme.txt" ); // returns FALSE
+ rx.exactMatch( "readme.txt" ); // returns false
.br
.fi
.PP
@@ -495,8 +495,8 @@ The CaretMode enum defines the different meanings of the caret (\fB^\fR) in a re
Constructs an empty regexp.
.PP
See also isValid() and errorString().
-.SH "QRegExp::QRegExp ( const TQString & pattern, bool caseSensitive = TRUE, bool wildcard = FALSE )"
-Constructs a regular expression object for the given \fIpattern\fR string. The pattern must be given using wildcard notation if \fIwildcard\fR is TRUE (default is FALSE). The pattern is case sensitive, unless \fIcaseSensitive\fR is FALSE. Matching is greedy (maximal), but can be changed by calling setMinimal().
+.SH "QRegExp::QRegExp ( const TQString & pattern, bool caseSensitive = true, bool wildcard = false )"
+Constructs a regular expression object for the given \fIpattern\fR string. The pattern must be given using wildcard notation if \fIwildcard\fR is true (default is false). The pattern is case sensitive, unless \fIcaseSensitive\fR is false. Matching is greedy (maximal), but can be changed by calling setMinimal().
.PP
See also setPattern(), setCaseSensitive(), setWildcard(), and setMinimal().
.SH "QRegExp::QRegExp ( const QRegExp & rx )"
@@ -619,7 +619,7 @@ The order of elements in the string list is as follows. The first element is the
.PP
See also cap(), pos(), exactMatch(), search(), and searchRev().
.SH "bool QRegExp::caseSensitive () const"
-Returns TRUE if case sensitivity is enabled; otherwise returns FALSE. The default is TRUE.
+Returns true if case sensitivity is enabled; otherwise returns false. The default is true.
.PP
See also setCaseSensitive().
.SH "TQString QRegExp::errorString ()"
@@ -652,23 +652,23 @@ This function is useful to construct regexp patterns dynamically:
.br
.fi
.SH "bool QRegExp::exactMatch ( const TQString & str ) const"
-Returns TRUE if \fIstr\fR is matched exactly by this regular expression; otherwise returns FALSE. You can determine how much of the string was matched by calling matchedLength().
+Returns true if \fIstr\fR is matched exactly by this regular expression; otherwise returns false. You can determine how much of the string was matched by calling matchedLength().
.PP
For a given regexp string, R, exactMatch("R") is the equivalent of search("^R$") since exactMatch() effectively encloses the regexp in the start of string and end of string anchors, except that it sets matchedLength() differently.
.PP
-For example, if the regular expression is \fBblue\fR, then exactMatch() returns TRUE only for input \fCblue\fR. For inputs \fCbluebell\fR, \fCblutak\fR and \fClightblue\fR, exactMatch() returns FALSE and matchedLength() will return 4, 3 and 0 respectively.
+For example, if the regular expression is \fBblue\fR, then exactMatch() returns true only for input \fCblue\fR. For inputs \fCbluebell\fR, \fCblutak\fR and \fClightblue\fR, exactMatch() returns false and matchedLength() will return 4, 3 and 0 respectively.
.PP
Although const, this function sets matchedLength(), capturedTexts() and pos().
.PP
See also search(), searchRev(), and QRegExpValidator.
.SH "bool QRegExp::isEmpty () const"
-Returns TRUE if the pattern string is empty; otherwise returns FALSE.
+Returns true if the pattern string is empty; otherwise returns false.
.PP
-If you call exactMatch() with an empty pattern on an empty string it will return TRUE; otherwise it returns FALSE since it operates over the whole string. If you call search() with an empty pattern on \fIany\fR string it will return the start offset (0 by default) because the empty pattern matches the 'emptiness' at the start of the string. In this case the length of the match returned by matchedLength() will be 0.
+If you call exactMatch() with an empty pattern on an empty string it will return true; otherwise it returns false since it operates over the whole string. If you call search() with an empty pattern on \fIany\fR string it will return the start offset (0 by default) because the empty pattern matches the 'emptiness' at the start of the string. In this case the length of the match returned by matchedLength() will be 0.
.PP
See TQString::isEmpty().
.SH "bool QRegExp::isValid () const"
-Returns TRUE if the regular expression is valid; otherwise returns FALSE. An invalid regular expression never matches.
+Returns true if the regular expression is valid; otherwise returns false. An invalid regular expression never matches.
.PP
The pattern \fB[a-z\fR is an example of an invalid pattern, since it lacks a closing square bracket.
.PP
@@ -677,14 +677,14 @@ Note that the validity of a regexp may also depend on the setting of the wildcar
See also errorString().
.PP
Example: regexptester/regexptester.cpp.
-.SH "int QRegExp::match ( const TQString & str, int index = 0, int * len = 0, bool indexIsStart = TRUE ) const"
+.SH "int QRegExp::match ( const TQString & str, int index = 0, int * len = 0, bool indexIsStart = true ) const"
\fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code.
.PP
Attempts to match in \fIstr\fR, starting from position \fIindex\fR. Returns the position of the match, or -1 if there was no match.
.PP
The length of the match is stored in \fI*len\fR, unless \fIlen\fR is a null pointer.
.PP
-If \fIindexIsStart\fR is TRUE (the default), the position \fIindex\fR in the string will match the start of string anchor, \fB^\fR, in the regexp, if present. Otherwise, position 0 in \fIstr\fR will match.
+If \fIindexIsStart\fR is true (the default), the position \fIindex\fR in the string will match the start of string anchor, \fB^\fR, in the regexp, if present. Otherwise, position 0 in \fIstr\fR will match.
.PP
Use search() and matchedLength() instead of this function.
.PP
@@ -699,7 +699,7 @@ See also exactMatch(), search(), and searchRev().
Examples:
.)l network/archivesearch/archivedialog.ui.h and regexptester/regexptester.cpp.
.SH "bool QRegExp::minimal () const"
-Returns TRUE if minimal (non-greedy) matching is enabled; otherwise returns FALSE.
+Returns true if minimal (non-greedy) matching is enabled; otherwise returns false.
.PP
See also setMinimal().
.SH "int QRegExp::numCaptures () const"
@@ -707,13 +707,13 @@ Returns the number of captures contained in the regular expression.
.PP
Example: regexptester/regexptester.cpp.
.SH "bool QRegExp::operator!= ( const QRegExp & rx ) const"
-Returns TRUE if this regular expression is not equal to \fIrx\fR; otherwise returns FALSE.
+Returns true if this regular expression is not equal to \fIrx\fR; otherwise returns false.
.PP
See also operator==().
.SH "QRegExp & QRegExp::operator= ( const QRegExp & rx )"
Copies the regular expression \fIrx\fR and returns a reference to the copy. The case sensitivity, wildcard and minimal matching options are also copied.
.SH "bool QRegExp::operator== ( const QRegExp & rx ) const"
-Returns TRUE if this regular expression is equal to \fIrx\fR; otherwise returns FALSE.
+Returns true if this regular expression is equal to \fIrx\fR; otherwise returns false.
.PP
Two QRegExp objects are equal if they have the same pattern strings and the same settings for case sensitivity, wildcard and minimal matching.
.SH "TQString QRegExp::pattern () const"
@@ -796,13 +796,13 @@ See also search() and exactMatch().
.SH "void QRegExp::setCaseSensitive ( bool sensitive )"
Sets case sensitive matching to \fIsensitive\fR.
.PP
-If \fIsensitive\fR is TRUE, \fB\.txt$\fR matches \fCreadme.txt\fR but not \fCREADME.TXT\fR.
+If \fIsensitive\fR is true, \fB\.txt$\fR matches \fCreadme.txt\fR but not \fCREADME.TXT\fR.
.PP
See also caseSensitive().
.PP
Example: regexptester/regexptester.cpp.
.SH "void QRegExp::setMinimal ( bool minimal )"
-Enables or disables minimal matching. If \fIminimal\fR is FALSE, matching is greedy (maximal) which is the default.
+Enables or disables minimal matching. If \fIminimal\fR is false, matching is greedy (maximal) which is the default.
.PP
For example, suppose we have the input string "We must be <b>bold</b>, very <b>bold</b>!" and the pattern \fB<b>.*</b>\fR. With the default greedy (maximal) matching, the match is "We must be <u><b>bold</b>, very <b>bold</b></u>!". But with minimal (non-greedy) matching the first match is: "We must be <u><b>bold</b></u>, very <b>bold</b>!" and the second match is "We must be <b>bold</b>, very <u><b>bold</b></u>!". In practice we might use the pattern \fB<b>[^<]+</b>\fR instead, although this will still fail for nested tags.
.PP
@@ -815,9 +815,9 @@ Sets the pattern string to \fIpattern\fR. The case sensitivity, wildcard and min
.PP
See also pattern().
.SH "void QRegExp::setWildcard ( bool wildcard )"
-Sets the wildcard mode for the regular expression. The default is FALSE.
+Sets the wildcard mode for the regular expression. The default is false.
.PP
-Setting \fIwildcard\fR to TRUE enables simple shell-like wildcard matching. (See wildcard matching (globbing).)
+Setting \fIwildcard\fR to true enables simple shell-like wildcard matching. (See wildcard matching (globbing).)
.PP
For example, \fBr*.txt\fR matches the string \fCreadme.txt\fR in wildcard mode, but does not match \fCreadme\fR.
.PP
@@ -825,7 +825,7 @@ See also wildcard().
.PP
Example: regexptester/regexptester.cpp.
.SH "bool QRegExp::wildcard () const"
-Returns TRUE if wildcard mode is enabled; otherwise returns FALSE. The default is FALSE.
+Returns true if wildcard mode is enabled; otherwise returns false. The default is false.
.PP
See also setWildcard().