From 4d495175043c399fdca6e1bb4c74ef176fc76fb4 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Wed, 6 Aug 2025 11:29:57 +0900 Subject: Replace TRUE/FALSE with boolean values true/false - part 4 Signed-off-by: Michele Calgaro --- doc/html/tqcstring.html | 158 ++++++++++++++++++++++++------------------------ 1 file changed, 79 insertions(+), 79 deletions(-) (limited to 'doc/html/tqcstring.html') diff --git a/doc/html/tqcstring.html b/doc/html/tqcstring.html index 05e830590..1f164c561 100644 --- a/doc/html/tqcstring.html +++ b/doc/html/tqcstring.html @@ -54,20 +54,20 @@ zero-terminated char array (char *).
  • bool fill ( char c, int len = -1 )
  • TQCString copy () const
  • TQCString & sprintf ( const char * format, ... )
  • -
  • int find ( char c, int index = 0, bool cs = TRUE ) const
  • -
  • int find ( const char * str, int index = 0, bool cs = TRUE ) const
  • +
  • int find ( char c, int index = 0, bool cs = true ) const
  • +
  • int find ( const char * str, int index = 0, bool cs = true ) const
  • int find ( const TQRegExp & rx, int index = 0 ) const
  • -
  • int findRev ( char c, int index = -1, bool cs = TRUE ) const
  • -
  • int findRev ( const char * str, int index = -1, bool cs = TRUE ) const
  • +
  • int findRev ( char c, int index = -1, bool cs = true ) const
  • +
  • int findRev ( const char * str, int index = -1, bool cs = true ) const
  • int findRev ( const TQRegExp & rx, int index = -1 ) const
  • -
  • int contains ( char c, bool cs = TRUE ) const
  • -
  • int contains ( const char * str, bool cs = TRUE ) const
  • +
  • int contains ( char c, bool cs = true ) const
  • +
  • int contains ( const char * str, bool cs = true ) const
  • int contains ( const TQRegExp & rx ) const
  • TQCString left ( uint len ) const
  • TQCString right ( uint len ) const
  • TQCString mid ( uint index, uint len = 0xffffffff ) const
  • -
  • TQCString leftJustify ( uint width, char fill = ' ', bool truncate = FALSE ) const
  • -
  • TQCString rightJustify ( uint width, char fill = ' ', bool truncate = FALSE ) const
  • +
  • TQCString leftJustify ( uint width, char fill = ' ', bool truncate = false ) const
  • +
  • TQCString rightJustify ( uint width, char fill = ' ', bool truncate = false ) const
  • TQCString lower () const
  • TQCString upper () const
  • TQCString stripWhiteSpace () const
  • @@ -258,20 +258,20 @@ null string is created.

    Appends string str to the string and returns a reference to the string. Equivalent to operator+=(). -

    int TQCString::contains ( char c, bool cs = TRUE ) const +

    int TQCString::contains ( char c, bool cs = true ) const

    Returns the number of times the character c occurs in the string. -

    The match is case sensitive if cs is TRUE, or case insensitive -if cs if FALSE. +

    The match is case sensitive if cs is true, or case insensitive +if cs if false.

    See also Note on character comparisons. -

    int TQCString::contains ( const char * str, bool cs = TRUE ) const +

    int TQCString::contains ( const char * str, bool cs = true ) const

    This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

    Returns the number of times str occurs in the string. -

    The match is case sensitive if cs is TRUE, or case insensitive -if cs if FALSE. +

    The match is case sensitive if cs is true, or case insensitive +if cs if false.

    This function counts overlapping substrings, for example, "banana" contains two occurrences of "ana".

    See also findRev() and Note on character comparisons. @@ -283,7 +283,7 @@ This is an overloaded member function, provided for convenience. It behaves esse

    Example:

         TQString s = "banana and panama";
    -    TQRegExp r = TQRegExp( "a[nm]a", TRUE, FALSE );
    +    TQRegExp r = TQRegExp( "a[nm]a", true, false );
         s.contains( r ); // 4 matches
         
    @@ -304,26 +304,26 @@ apply the function to that. Fills the string with len bytes of character c, followed by a '\0'-terminator.

    If len is negative, then the current string length is used. -

    Returns FALSE is len is nonnegative and there is not enough -memory to resize the string; otherwise returns TRUE. +

    Returns false is len is nonnegative and there is not enough +memory to resize the string; otherwise returns true. -

    int TQCString::find ( char c, int index = 0, bool cs = TRUE ) const +

    int TQCString::find ( char c, int index = 0, bool cs = true ) const

    Finds the first occurrence of the character c, starting at position index. -

    The search is case sensitive if cs is TRUE, or case insensitive -if cs is FALSE. +

    The search is case sensitive if cs is true, or case insensitive +if cs is false.

    Returns the position of c, or -1 if c could not be found.

    See also Note on character comparisons.

    Example: network/networkprotocol/nntp.cpp. -

    int TQCString::find ( const char * str, int index = 0, bool cs = TRUE ) const +

    int TQCString::find ( const char * str, int index = 0, bool cs = true ) const

    This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

    Finds the first occurrence of the string str, starting at position index. -

    The search is case sensitive if cs is TRUE, or case insensitive -if cs is FALSE. +

    The search is case sensitive if cs is true, or case insensitive +if cs is false.

    Returns the position of str, or -1 if str could not be found.

    See also Note on character comparisons. @@ -339,22 +339,22 @@ found. string it is more efficient to convert the string to a TQString and apply the function to that. -

    int TQCString::findRev ( char c, int index = -1, bool cs = TRUE ) const +

    int TQCString::findRev ( char c, int index = -1, bool cs = true ) const

    Finds the first occurrence of the character c, starting at position index and searching backwards. -

    The search is case sensitive if cs is TRUE, or case insensitive -if cs is FALSE. +

    The search is case sensitive if cs is true, or case insensitive +if cs is false.

    Returns the position of c, or -1 if c could not be found.

    See also Note on character comparisons. -

    int TQCString::findRev ( const char * str, int index = -1, bool cs = TRUE ) const +

    int TQCString::findRev ( const char * str, int index = -1, bool cs = true ) const

    This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

    Finds the first occurrence of the string str, starting at position index and searching backwards. -

    The search is case sensitive if cs is TRUE, or case insensitive -if cs is FALSE. +

    The search is case sensitive if cs is true, or case insensitive +if cs is false.

    Returns the position of str, or -1 if str could not be found.

    See also Note on character comparisons. @@ -404,8 +404,8 @@ is appended.

    bool TQCString::isEmpty () const

    -

    Returns TRUE if the string is empty, i.e. if length() == 0; -otherwise returns FALSE. An empty string is not always a null +

    Returns true if the string is empty, i.e. if length() == 0; +otherwise returns false. An empty string is not always a null string.

    See example in isNull().

    See also isNull(), length(), and size(). @@ -413,16 +413,16 @@ string.

    bool TQCString::isNull () const

    -

    Returns TRUE if the string is null, i.e. if data() == 0; otherwise -returns FALSE. A null string is also an empty string. +

    Returns true if the string is null, i.e. if data() == 0; otherwise +returns false. A null string is also an empty string.

    Example:

         TQCString a;         // a.data() == 0,  a.size() == 0, a.length() == 0
         TQCString b == "";   // b.data() == "", b.size() == 1, b.length() == 0
    -    a.isNull();         // TRUE  because a.data() == 0
    -    a.isEmpty();        // TRUE  because a.length() == 0
    -    b.isNull();         // FALSE because b.data() == ""
    -    b.isEmpty();        // TRUE  because b.length() == 0
    +    a.isNull();         // true  because a.data() == 0
    +    a.isEmpty();        // true  because a.length() == 0
    +    b.isNull();         // false because b.data() == ""
    +    b.isEmpty();        // true  because b.length() == 0
         

    See also isEmpty(), length(), and size(). @@ -442,13 +442,13 @@ string.

    See also right() and mid().

    Example: network/networkprotocol/nntp.cpp. -

    TQCString TQCString::leftJustify ( uint width, char fill = ' ', bool truncate = FALSE ) const +

    TQCString TQCString::leftJustify ( uint width, char fill = ' ', bool truncate = false ) const

    Returns a string of length width (plus one for the terminating '\0') that contains this string padded with the fill character.

    If the length of the string exceeds width and truncate is -FALSE (the default), then the returned string is a copy of the -string. If the length of the string exceeds width and truncate is TRUE, then the returned string is a left(width). +false (the default), then the returned string is a copy of the +string. If the length of the string exceeds width and truncate is true, then the returned string is a left(width).

    Example:

         TQCString s("apple");
    @@ -636,14 +636,14 @@ string.
     

    See also left() and mid().

    Example: network/networkprotocol/nntp.cpp. -

    TQCString TQCString::rightJustify ( uint width, char fill = ' ', bool truncate = FALSE ) const +

    TQCString TQCString::rightJustify ( uint width, char fill = ' ', bool truncate = false ) const

    Returns a string of length width (plus one for the terminating '\0') that contains zero or more of the fill character followed by this string.

    If the length of the string exceeds width and truncate is -FALSE (the default), then the returned string is a copy of the -string. If the length of the string exceeds width and truncate is TRUE, then the returned string is a left(width). +false (the default), then the returned string is a copy of the +string. If the length of the string exceeds width and truncate is true, then the returned string is a left(width).

    Example:

         TQCString s("pie");
    @@ -656,8 +656,8 @@ string. If the length of the string exceeds width and truncate
     
     Sets the character at position index to c and expands the
     string if necessary, padding with spaces.
    -

    Returns FALSE if index was out of range and the string could -not be expanded; otherwise returns TRUE. +

    Returns false if index was out of range and the string could +not be expanded; otherwise returns true.

    TQCString & TQCString::setNum ( double n, char f = 'g', int prec = 6 )

    @@ -768,58 +768,58 @@ and the end.

    double TQCString::toDouble ( bool * ok = 0 ) const

    Returns the string converted to a double value. -

    If ok is not 0: *ok is set to FALSE if the string is not a +

    If ok is not 0: *ok is set to false if the string is not a number, or if it has trailing garbage; otherwise *ok is set to -TRUE. +true.

    float TQCString::toFloat ( bool * ok = 0 ) const

    Returns the string converted to a float value. -

    If ok is not 0: *ok is set to FALSE if the string is not a +

    If ok is not 0: *ok is set to false if the string is not a number, or if it has trailing garbage; otherwise *ok is set to -TRUE. +true.

    int TQCString::toInt ( bool * ok = 0 ) const

    Returns the string converted to a int value. -

    If ok is not 0: *ok is set to FALSE if the string is not a +

    If ok is not 0: *ok is set to false if the string is not a number, or if it has trailing garbage; otherwise *ok is set to -TRUE. +true.

    long TQCString::toLong ( bool * ok = 0 ) const

    Returns the string converted to a long value. -

    If ok is not 0: *ok is set to FALSE if the string is not a +

    If ok is not 0: *ok is set to false if the string is not a number, or if it has trailing garbage; otherwise *ok is set to -TRUE. +true.

    short TQCString::toShort ( bool * ok = 0 ) const

    Returns the string converted to a short value. -

    If ok is not 0: *ok is set to FALSE if the string is not a +

    If ok is not 0: *ok is set to false if the string is not a number, is out of range, or if it has trailing garbage; otherwise -*ok is set to TRUE. +*ok is set to true.

    uint TQCString::toUInt ( bool * ok = 0 ) const

    Returns the string converted to an unsigned int value. -

    If ok is not 0: *ok is set to FALSE if the string is not a +

    If ok is not 0: *ok is set to false if the string is not a number, or if it has trailing garbage; otherwise *ok is set to -TRUE. +true.

    ulong TQCString::toULong ( bool * ok = 0 ) const

    Returns the string converted to an unsigned long value. -

    If ok is not 0: *ok is set to FALSE if the string is not a +

    If ok is not 0: *ok is set to false if the string is not a number, or if it has trailing garbage; otherwise *ok is set to -TRUE. +true.

    ushort TQCString::toUShort ( bool * ok = 0 ) const

    Returns the string converted to an unsigned short value. -

    If ok is not 0: *ok is set to FALSE if the string is not a +

    If ok is not 0: *ok is set to false if the string is not a number, is out of range, or if it has trailing garbage; otherwise -*ok is set to TRUE. +*ok is set to true.

    bool TQCString::truncate ( uint pos )

    @@ -850,21 +850,21 @@ Returns a new string that is a copy of this string converted to upper case.

    -

    Returns TRUE if s1 and s2 are different; otherwise returns FALSE. +

    Returns true if s1 and s2 are different; otherwise returns false.

    Equivalent to qstrcmp(s1, s2) != 0.

    bool operator!= ( const TQCString & s1, const char * s2 )

    This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

    -

    Returns TRUE if s1 and s2 are different; otherwise returns FALSE. +

    Returns true if s1 and s2 are different; otherwise returns false.

    Equivalent to qstrcmp(s1, s2) != 0.

    bool operator!= ( const char * s1, const TQCString & s2 )

    This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

    -

    Returns TRUE if s1 and s2 are different; otherwise returns FALSE. +

    Returns true if s1 and s2 are different; otherwise returns false.

    Equivalent to qstrcmp(s1, s2) != 0.

    const TQCString operator+ ( const TQCString & s1, const TQCString & s2 ) @@ -902,7 +902,7 @@ This is an overloaded member function, provided for convenience. It behaves esse

    -

    Returns TRUE if s1 is less than s2; otherwise returns FALSE. +

    Returns true if s1 is less than s2; otherwise returns false.

    Equivalent to qstrcmp(s1, s2) < 0.

    See also Note on character comparisons. @@ -910,7 +910,7 @@ This is an overloaded member function, provided for convenience. It behaves esse This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

    -

    Returns TRUE if s1 is less than s2; otherwise returns FALSE. +

    Returns true if s1 is less than s2; otherwise returns false.

    Equivalent to qstrcmp(s1, s2) < 0.

    See also Note on character comparisons. @@ -924,8 +924,8 @@ This is an overloaded member function, provided for convenience. It behaves esse

    -

    Returns TRUE if s1 is less than or equal to s2; otherwise -returns FALSE. +

    Returns true if s1 is less than or equal to s2; otherwise +returns false.

    Equivalent to qstrcmp(s1, s2) <= 0.

    See also Note on character comparisons. @@ -933,8 +933,8 @@ returns FALSE. This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

    -

    Returns TRUE if s1 is less than or equal to s2; otherwise -returns FALSE. +

    Returns true if s1 is less than or equal to s2; otherwise +returns false.

    Equivalent to qstrcmp(s1, s2) <= 0.

    See also Note on character comparisons. @@ -942,28 +942,28 @@ returns FALSE.

    -

    Returns TRUE if s1 and s2 are equal; otherwise returns FALSE. +

    Returns true if s1 and s2 are equal; otherwise returns false.

    Equivalent to qstrcmp(s1, s2) == 0.

    bool operator== ( const TQCString & s1, const char * s2 )

    This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

    -

    Returns TRUE if s1 and s2 are equal; otherwise returns FALSE. +

    Returns true if s1 and s2 are equal; otherwise returns false.

    Equivalent to qstrcmp(s1, s2) == 0.

    bool operator== ( const char * s1, const TQCString & s2 )

    This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

    -

    Returns TRUE if s1 and s2 are equal; otherwise returns FALSE. +

    Returns true if s1 and s2 are equal; otherwise returns false.

    Equivalent to qstrcmp(s1, s2) == 0.

    bool operator> ( const TQCString & s1, const char * s2 )

    -

    Returns TRUE if s1 is greater than s2; otherwise returns FALSE. +

    Returns true if s1 is greater than s2; otherwise returns false.

    Equivalent to qstrcmp(s1, s2) > 0.

    See also Note on character comparisons. @@ -971,7 +971,7 @@ This is an overloaded member function, provided for convenience. It behaves esse This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

    -

    Returns TRUE if s1 is greater than s2; otherwise returns FALSE. +

    Returns true if s1 is greater than s2; otherwise returns false.

    Equivalent to qstrcmp(s1, s2) > 0.

    See also Note on character comparisons. @@ -979,8 +979,8 @@ This is an overloaded member function, provided for convenience. It behaves esse

    -

    Returns TRUE if s1 is greater than or equal to s2; otherwise -returns FALSE. +

    Returns true if s1 is greater than or equal to s2; otherwise +returns false.

    Equivalent to qstrcmp(s1, s2) >= 0.

    See also Note on character comparisons. @@ -988,8 +988,8 @@ returns FALSE. This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

    -

    Returns TRUE if s1 is greater than or equal to s2; otherwise -returns FALSE. +

    Returns true if s1 is greater than or equal to s2; otherwise +returns false.

    Equivalent to qstrcmp(s1, s2) >= 0.

    See also Note on character comparisons. -- cgit v1.2.3