diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-08-06 11:29:57 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-08-06 11:29:57 +0900 |
commit | dcce5b1f2c449ed9a02b1752e0d74f147a83d07d (patch) | |
tree | d57fe27457a96451f1a67e2a2db268a441d917fc /doc/html/tqregexp.html | |
parent | 649c4c61a1f1f479f4532b196f68df476cef2680 (diff) | |
download | tqt-rename/true-false-4.tar.gz tqt-rename/true-false-4.zip |
Replace TRUE/FALSE with boolean values true/false - part 4rename/true-false-4
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'doc/html/tqregexp.html')
-rw-r--r-- | doc/html/tqregexp.html | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/doc/html/tqregexp.html b/doc/html/tqregexp.html index 142fcd00d..d8f8b10f3 100644 --- a/doc/html/tqregexp.html +++ b/doc/html/tqregexp.html @@ -39,7 +39,7 @@ body { background: #ffffff; color: black; } <ul> <li class=fn>enum <a href="#CaretMode-enum"><b>CaretMode</b></a> { CaretAtZero, CaretAtOffset, CaretWontMatch }</li> <li class=fn><a href="#TQRegExp"><b>TQRegExp</b></a> ()</li> -<li class=fn><a href="#TQRegExp-2"><b>TQRegExp</b></a> ( const TQString & pattern, bool caseSensitive = TRUE, bool wildcard = FALSE )</li> +<li class=fn><a href="#TQRegExp-2"><b>TQRegExp</b></a> ( const TQString & pattern, bool caseSensitive = true, bool wildcard = false )</li> <li class=fn><a href="#TQRegExp-3"><b>TQRegExp</b></a> ( const TQRegExp & rx )</li> <li class=fn><a href="#~TQRegExp"><b>~TQRegExp</b></a> ()</li> <li class=fn>TQRegExp & <a href="#operator-eq"><b>operator=</b></a> ( const TQRegExp & rx )</li> @@ -56,7 +56,7 @@ body { background: #ffffff; color: black; } <li class=fn>bool <a href="#minimal"><b>minimal</b></a> () const</li> <li class=fn>void <a href="#setMinimal"><b>setMinimal</b></a> ( bool minimal )</li> <li class=fn>bool <a href="#exactMatch"><b>exactMatch</b></a> ( const TQString & str ) const</li> -<li class=fn>int match ( const TQString & str, int index = 0, int * len = 0, bool indexIsStart = TRUE ) const <em>(obsolete)</em></li> +<li class=fn>int match ( const TQString & str, int index = 0, int * len = 0, bool indexIsStart = true ) const <em>(obsolete)</em></li> <li class=fn>int <a href="#search"><b>search</b></a> ( const TQString & str, int offset = 0, CaretMode caretMode = CaretAtZero ) const</li> <li class=fn>int <a href="#searchRev"><b>searchRev</b></a> ( const TQString & str, int offset = -1, CaretMode caretMode = CaretAtZero ) const</li> <li class=fn>int <a href="#matchedLength"><b>matchedLength</b></a> () const</li> @@ -488,11 +488,11 @@ but can be applied to all the quantifiers in the pattern. For example, to match the Perl regexp <b>ro+?m</b> requires: <pre> TQRegExp rx( "ro+m" ); - rx.<a href="#setMinimal">setMinimal</a>( TRUE ); + rx.<a href="#setMinimal">setMinimal</a>( true ); </pre> <p> The equivalent of Perl's <tt>/i</tt> option is -<a href="#setCaseSensitive">setCaseSensitive</a>(FALSE). +<a href="#setCaseSensitive">setCaseSensitive</a>(false). <p> Perl's <tt>/g</tt> option can be emulated using a <a href="#cap_in_a_loop">loop</a>. <p> In TQRegExp <b>.</b> matches any character, therefore all TQRegExp regexps have the equivalent of Perl's <tt>/s</tt> option. TQRegExp @@ -630,10 +630,10 @@ as an argument and split a string accordingly. <p> To imitate the matching of a shell we can use wildcard mode. <p> <pre> TQRegExp rx( "*.html" ); // invalid regexp: * doesn't quantify anything - rx.<a href="#setWildcard">setWildcard</a>( TRUE ); // now it's a valid wildcard regexp - rx.<a href="#exactMatch">exactMatch</a>( "index.html" ); // returns TRUE - rx.<a href="#exactMatch">exactMatch</a>( "default.htm" ); // returns FALSE - rx.<a href="#exactMatch">exactMatch</a>( "readme.txt" ); // returns FALSE + rx.<a href="#setWildcard">setWildcard</a>( true ); // now it's a valid wildcard regexp + rx.<a href="#exactMatch">exactMatch</a>( "index.html" ); // returns true + rx.<a href="#exactMatch">exactMatch</a>( "default.htm" ); // returns false + rx.<a href="#exactMatch">exactMatch</a>( "readme.txt" ); // returns false </pre> <p> Wildcard matching can be convenient because of its simplicity, but @@ -673,11 +673,11 @@ The caret never matches. Constructs an empty regexp. <p> <p>See also <a href="#isValid">isValid</a>() and <a href="#errorString">errorString</a>(). -<h3 class=fn><a name="TQRegExp-2"></a>TQRegExp::TQRegExp ( const <a href="tqstring.html">TQString</a> & pattern, bool caseSensitive = TRUE, bool wildcard = FALSE ) +<h3 class=fn><a name="TQRegExp-2"></a>TQRegExp::TQRegExp ( const <a href="tqstring.html">TQString</a> & pattern, bool caseSensitive = true, bool wildcard = false ) </h3> Constructs a <a href="tqregexp.html#regular-expression">regular expression</a> object for the given <em>pattern</em> -string. The pattern must be given using wildcard notation if <em>wildcard</em> is TRUE (default is FALSE). The pattern is case -sensitive, unless <em>caseSensitive</em> is FALSE. Matching is greedy +string. The pattern must be given using wildcard notation if <em>wildcard</em> is true (default is false). The pattern is case +sensitive, unless <em>caseSensitive</em> is false. Matching is greedy (maximal), but can be changed by calling <a href="#setMinimal">setMinimal</a>(). <p> <p>See also <a href="#setPattern">setPattern</a>(), <a href="#setCaseSensitive">setCaseSensitive</a>(), <a href="#setWildcard">setWildcard</a>(), and <a href="#setMinimal">setMinimal</a>(). @@ -783,8 +783,8 @@ capturedTexts()[2] is the text of the second and so on <h3 class=fn>bool <a name="caseSensitive"></a>TQRegExp::caseSensitive () const </h3> -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. <p> <p>See also <a href="#setCaseSensitive">setCaseSensitive</a>(). <h3 class=fn><a href="tqstring.html">TQString</a> <a name="errorString"></a>TQRegExp::errorString () @@ -814,14 +814,14 @@ escaped with a backslash. The special characters are $, (, ), *, +, <h3 class=fn>bool <a name="exactMatch"></a>TQRegExp::exactMatch ( const <a href="tqstring.html">TQString</a> & str ) const </h3> -Returns TRUE if <em>str</em> is matched exactly by this <a href="tqregexp.html#regular-expression">regular expression</a>; otherwise returns FALSE. You can determine how much of +Returns true if <em>str</em> is matched exactly by this <a href="tqregexp.html#regular-expression">regular expression</a>; otherwise returns false. You can determine how much of the string was matched by calling <a href="#matchedLength">matchedLength</a>(). <p> For a given regexp string, R, <a href="#exactMatch">exactMatch</a>("R") is the equivalent of <a href="#search">search</a>("^R$") since exactMatch() effectively encloses the regexp in the start of string and end of string anchors, except that it sets matchedLength() differently. <p> For example, if the regular expression is <b>blue</b>, then -exactMatch() returns TRUE only for input <tt>blue</tt>. For inputs <tt>bluebell</tt>, <tt>blutak</tt> and <tt>lightblue</tt>, exactMatch() returns FALSE +exactMatch() returns true only for input <tt>blue</tt>. For inputs <tt>bluebell</tt>, <tt>blutak</tt> and <tt>lightblue</tt>, exactMatch() returns false and matchedLength() will return 4, 3 and 0 respectively. <p> Although const, this function sets matchedLength(), <a href="#capturedTexts">capturedTexts</a>() and <a href="#pos">pos</a>(). @@ -829,10 +829,10 @@ and matchedLength() will return 4, 3 and 0 respectively. <h3 class=fn>bool <a name="isEmpty"></a>TQRegExp::isEmpty () const </h3> -Returns TRUE if the pattern string is empty; otherwise returns -FALSE. +Returns true if the pattern string is empty; otherwise returns +false. <p> If you call <a href="#exactMatch">exactMatch</a>() with an empty pattern on an empty string -it will return TRUE; otherwise it returns FALSE since it operates +it will return true; otherwise it returns false since it operates over the whole string. If you call <a href="#search">search</a>() with an empty pattern on <em>any</em> string it will return the start offset (0 by default) because the empty pattern matches the 'emptiness' at the start of @@ -842,8 +842,8 @@ the string. In this case the length of the match returned by <h3 class=fn>bool <a name="isValid"></a>TQRegExp::isValid () const </h3> -Returns TRUE if the <a href="tqregexp.html#regular-expression">regular expression</a> is valid; otherwise returns -FALSE. An invalid regular expression never matches. +Returns true if the <a href="tqregexp.html#regular-expression">regular expression</a> is valid; otherwise returns +false. An invalid regular expression never matches. <p> The pattern <b>[a-z</b> is an example of an invalid pattern, since it lacks a closing square bracket. <p> Note that the validity of a regexp may also depend on the setting @@ -852,13 +852,13 @@ wildcard regexp but an invalid full regexp. <p> <p>See also <a href="#errorString">errorString</a>(). <p>Example: <a href="regexptester-example.html#x2487">regexptester/regexptester.cpp</a>. -<h3 class=fn>int <a name="match"></a>TQRegExp::match ( const <a href="tqstring.html">TQString</a> & str, int index = 0, int * len = 0, bool indexIsStart = TRUE ) const +<h3 class=fn>int <a name="match"></a>TQRegExp::match ( const <a href="tqstring.html">TQString</a> & str, int index = 0, int * len = 0, bool indexIsStart = true ) const </h3> <b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code. <p> Attempts to match in <em>str</em>, starting from position <em>index</em>. Returns the position of the match, or -1 if there was no match. <p> The length of the match is stored in <em>*len</em>, unless <em>len</em> is a null pointer. -<p> If <em>indexIsStart</em> is TRUE (the default), the position <em>index</em> in +<p> If <em>indexIsStart</em> is true (the default), the position <em>index</em> in the string will match the start of string anchor, <b>^</b>, in the regexp, if present. Otherwise, position 0 in <em>str</em> will match. <p> Use <a href="#search">search</a>() and <a href="#matchedLength">matchedLength</a>() instead of this function. @@ -874,8 +874,8 @@ no match. <p>Examples: <a href="archivesearch-example.html#x480">network/archivesearch/archivedialog.ui.h</a> and <a href="regexptester-example.html#x2488">regexptester/regexptester.cpp</a>. <h3 class=fn>bool <a name="minimal"></a>TQRegExp::minimal () const </h3> -Returns TRUE if minimal (non-greedy) matching is enabled; -otherwise returns FALSE. +Returns true if minimal (non-greedy) matching is enabled; +otherwise returns false. <p> <p>See also <a href="#setMinimal">setMinimal</a>(). <h3 class=fn>int <a name="numCaptures"></a>TQRegExp::numCaptures () const @@ -886,8 +886,8 @@ Returns the number of captures contained in the <a href="tqregexp.html#regular-e <h3 class=fn>bool <a name="operator!-eq"></a>TQRegExp::operator!= ( const <a href="tqregexp.html">TQRegExp</a> & rx ) const </h3> -<p> Returns TRUE if this <a href="tqregexp.html#regular-expression">regular expression</a> is not equal to <em>rx</em>; -otherwise returns FALSE. +<p> Returns true if this <a href="tqregexp.html#regular-expression">regular expression</a> is not equal to <em>rx</em>; +otherwise returns false. <p> <p>See also <a href="#operator-eq-eq">operator==</a>(). <h3 class=fn><a href="tqregexp.html">TQRegExp</a> & <a name="operator-eq"></a>TQRegExp::operator= ( const <a href="tqregexp.html">TQRegExp</a> & rx ) @@ -898,8 +898,8 @@ are also copied. <h3 class=fn>bool <a name="operator-eq-eq"></a>TQRegExp::operator== ( const <a href="tqregexp.html">TQRegExp</a> & rx ) const </h3> -Returns TRUE if this <a href="tqregexp.html#regular-expression">regular expression</a> is equal to <em>rx</em>; -otherwise returns FALSE. +Returns true if this <a href="tqregexp.html#regular-expression">regular expression</a> is equal to <em>rx</em>; +otherwise returns false. <p> Two TQRegExp objects are equal if they have the same pattern strings and the same settings for case sensitivity, wildcard and minimal matching. @@ -977,14 +977,14 @@ forwards. <h3 class=fn>void <a name="setCaseSensitive"></a>TQRegExp::setCaseSensitive ( bool sensitive ) </h3> Sets case sensitive matching to <em>sensitive</em>. -<p> If <em>sensitive</em> is TRUE, <b>\.txt$</b> matches <tt>readme.txt</tt> but +<p> If <em>sensitive</em> is true, <b>\.txt$</b> matches <tt>readme.txt</tt> but not <tt>README.TXT</tt>. <p> <p>See also <a href="#caseSensitive">caseSensitive</a>(). <p>Example: <a href="regexptester-example.html#x2491">regexptester/regexptester.cpp</a>. <h3 class=fn>void <a name="setMinimal"></a>TQRegExp::setMinimal ( bool minimal ) </h3> -Enables or disables minimal matching. If <em>minimal</em> is FALSE, +Enables or disables minimal matching. If <em>minimal</em> is false, matching is greedy (maximal) which is the default. <p> For example, suppose we have the input string "We must be <b>bold</b>, very <b>bold</b>!" and the pattern @@ -1008,8 +1008,8 @@ wildcard and minimal matching options are not changed. <h3 class=fn>void <a name="setWildcard"></a>TQRegExp::setWildcard ( bool wildcard ) </h3> Sets the wildcard mode for the <a href="tqregexp.html#regular-expression">regular expression</a>. The default is -FALSE. -<p> Setting <em>wildcard</em> to TRUE enables simple shell-like wildcard +false. +<p> Setting <em>wildcard</em> to true enables simple shell-like wildcard matching. (See <a href="#wildcard-matching">wildcard matching (globbing)</a>.) <p> For example, <b>r*.txt</b> matches the string <tt>readme.txt</tt> in @@ -1019,8 +1019,8 @@ wildcard mode, but does not match <tt>readme</tt>. <p>Example: <a href="regexptester-example.html#x2493">regexptester/regexptester.cpp</a>. <h3 class=fn>bool <a name="wildcard"></a>TQRegExp::wildcard () const </h3> -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. <p> <p>See also <a href="#setWildcard">setWildcard</a>(). <!-- eof --> |