diff options
Diffstat (limited to 'doc/man/man3/tqregexp.3qt')
-rw-r--r-- | doc/man/man3/tqregexp.3qt | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/doc/man/man3/tqregexp.3qt b/doc/man/man3/tqregexp.3qt index 09cf52cc2..7cdf54fd1 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 "\fBTQRegExp\fR ()" .br .ti -1c -.BI "\fBTQRegExp\fR ( const TQString & pattern, bool caseSensitive = TRUE, bool wildcard = FALSE )" +.BI "\fBTQRegExp\fR ( const TQString & pattern, bool caseSensitive = true, bool wildcard = false )" .br .ti -1c @@ -74,7 +74,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" @@ -292,11 +292,11 @@ TQRegExp's quantifiers are the same as Perl's greedy quantifiers. Non-greedy mat .br TQRegExp 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 @@ -466,13 +466,13 @@ To imitate the matching of a shell we can use wildcard mode. .br TQRegExp 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 @@ -496,8 +496,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 "TQRegExp::TQRegExp ( 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 "TQRegExp::TQRegExp ( 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 "TQRegExp::TQRegExp ( const TQRegExp & rx )" @@ -620,7 +620,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 TQRegExp::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 TQRegExp::errorString ()" @@ -653,23 +653,23 @@ This function is useful to construct regexp patterns dynamically: .br .fi .SH "bool TQRegExp::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 TQRegExpValidator. .SH "bool TQRegExp::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 TQRegExp::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 @@ -678,14 +678,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 TQRegExp::match ( const TQString & str, int index = 0, int * len = 0, bool indexIsStart = TRUE ) const" +.SH "int TQRegExp::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 @@ -700,7 +700,7 @@ See also exactMatch(), search(), and searchRev(). Examples: .)l network/archivesearch/archivedialog.ui.h and regexptester/regexptester.cpp. .SH "bool TQRegExp::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 TQRegExp::numCaptures () const" @@ -708,13 +708,13 @@ Returns the number of captures contained in the regular expression. .PP Example: regexptester/regexptester.cpp. .SH "bool TQRegExp::operator!= ( const TQRegExp & 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 "TQRegExp & TQRegExp::operator= ( const TQRegExp & 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 TQRegExp::operator== ( const TQRegExp & 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 TQRegExp objects are equal if they have the same pattern strings and the same settings for case sensitivity, wildcard and minimal matching. .SH "TQString TQRegExp::pattern () const" @@ -797,13 +797,13 @@ See also search() and exactMatch(). .SH "void TQRegExp::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 TQRegExp::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 @@ -816,9 +816,9 @@ Sets the pattern string to \fIpattern\fR. The case sensitivity, wildcard and min .PP See also pattern(). .SH "void TQRegExp::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 @@ -826,7 +826,7 @@ See also wildcard(). .PP Example: regexptester/regexptester.cpp. .SH "bool TQRegExp::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(). |