From 87d29563e3ccdeb7fea0197e262e667ef323ff9c Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sun, 7 Jul 2024 14:56:09 +0900 Subject: Rename utility class nt* related files to equivalent tq* Signed-off-by: Michele Calgaro --- doc/html/tqstring.html | 60 +++++++++++++++++++++++++------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) (limited to 'doc/html/tqstring.html') diff --git a/doc/html/tqstring.html b/doc/html/tqstring.html index 478935b9c..86556119f 100644 --- a/doc/html/tqstring.html +++ b/doc/html/tqstring.html @@ -266,18 +266,18 @@ convenience, TQString::null is a null empty strings come first, followed by non-empty strings, followed by null strings. We recommend using if ( !str.isNull() ) to check for a non-null string rather than if ( !str ); see operator!() for an explanation. -

Note that if you find that you are mixing usage of TQCString, -TQString, and TQByteArray, this causes lots of unnecessary +

Note that if you find that you are mixing usage of TQCString, +TQString, and TQByteArray, this causes lots of unnecessary copying and might indicate that the true nature of the data you are dealing with is uncertain. If the data is '\0'-terminated 8-bit -data, use TQCString; if it is unterminated (i.e. contains '\0's) -8-bit data, use TQByteArray; if it is text, use TQString. +data, use TQCString; if it is unterminated (i.e. contains '\0's) +8-bit data, use TQByteArray; if it is text, use TQString.

Lists of strings are handled by the TQStringList class. You can split a string into a list of strings using TQStringList::split(), and join a list of strings into a single string with an optional separator using TQStringList::join(). You can obtain a list of strings from a string list that contain a particular substring or -that match a particular regex using +that match a particular regex using TQStringList::grep().

Note for C programmers

Due to C++'s type system and the fact that TQString is implicitly shared, TQStrings can be treated like ints or other simple base @@ -316,8 +316,8 @@ incrementing a reference count. TQString (like all TQt's implicitly shared classes) operates on a copy-on-write basis, only copying if an instance is actually changed.

If you wish to create a deep copy of a TQString without losing any -Unicode information then you should use TQDeepCopy. -

See also TQChar, TQCString, TQByteArray, TQConstString, Implicitly and Explicitly Shared Classes, Text Related Classes, and Non-GUI Classes. +Unicode information then you should use TQDeepCopy. +

See also TQChar, TQCString, TQByteArray, TQConstString, Implicitly and Explicitly Shared Classes, Text Related Classes, and Non-GUI Classes.


Member Type Documentation

TQString::SectionFlags

@@ -355,7 +355,7 @@ Constructs a string of length one, containing the character ch. Constructs an implicitly shared copy of s. This is very fast since it only involves incrementing a reference count. -

TQString::TQString ( const TQByteArray & ba ) +

TQString::TQString ( const TQByteArray & ba )

Constructs a string that is a deep copy of ba interpreted as a classic C string. @@ -427,7 +427,7 @@ the result. the result.

Equivalent to operator+=(). -

TQString & TQString::append ( const TQByteArray & str ) +

TQString & TQString::append ( const TQByteArray & str )

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

Appends str to the string and returns a reference to the result. @@ -746,7 +746,7 @@ there are two instances of "ana" in "bananas".

See also findRev(). -

int TQString::contains ( const TQRegExp & rx ) const +

int TQString::contains ( const TQRegExp & rx ) const

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

Returns the number of times the regexp, rx, matches in the @@ -755,7 +755,7 @@ string. there are four instances of "ana" or "ama".

         TQString str = "banana and panama";
-        TQRegExp rxp = TQRegExp( "a[nm]a", TRUE, FALSE );
+        TQRegExp rxp = TQRegExp( "a[nm]a", TRUE, FALSE );
         int i = str.contains( rxp );    // i == 4
     
@@ -805,9 +805,9 @@ used. -

int TQString::find ( const TQRegExp & rx, int index = 0 ) const +

int TQString::find ( const TQRegExp & rx, int index = 0 ) const

-Finds the first match of the regular expression rx, starting +Finds the first match of the regular expression rx, starting from position index. If index is -1, the search starts at the last character; if -2, at the next to last character and so on. (See findRev() for searching backwards.) @@ -903,7 +903,7 @@ otherwise the search is case insensitive. -

int TQString::findRev ( const TQRegExp & rx, int index = -1 ) const +

int TQString::findRev ( const TQRegExp & rx, int index = -1 ) const

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

Finds the first match of the regexp rx, starting at position index and searching backwards. If the index is -1, the search @@ -996,7 +996,7 @@ and returns a reference to the string.

See also remove() and replace().

Examples: themes/themes.cpp and xform/xform.cpp. -

TQString & TQString::insert ( uint index, const TQByteArray & s ) +

TQString & TQString::insert ( uint index, const TQByteArray & s )

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

Inserts s into the string at position index and returns @@ -1112,7 +1112,7 @@ padded by the fill character.

See also isNull() and isEmpty().

Examples: dirview/dirview.cpp, fileiconview/qfileiconview.cpp, network/networkprotocol/nntp.cpp, rot13/rot13.cpp, and themes/themes.cpp. -

TQCString TQString::local8Bit () const +

TQCString TQString::local8Bit () const

Returns the string encoded in a locale-specific format. On X11, this is the TQTextCodec::codecForLocale(). On Windows, it is a @@ -1281,7 +1281,7 @@ which you wish to remain Unicode-clean. Appends str to the string and returns a reference to the string. -

TQString & TQString::operator+= ( const TQByteArray & str ) +

TQString & TQString::operator+= ( const TQByteArray & str )

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. @@ -1334,7 +1334,7 @@ to this string and returns a reference to this string.

Makes a deep copy of s and returns a reference to the deep copy. -

TQString & TQString::operator= ( const TQCString & cstr ) +

TQString & TQString::operator= ( const TQCString & cstr )

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

Assigns a deep copy of cstr, interpreted as a classic C @@ -1404,7 +1404,7 @@ reference to the string.

Equivalent to insert(0, ch).

See also insert(). -

TQString & TQString::prepend ( const TQByteArray & s ) +

TQString & TQString::prepend ( const TQByteArray & s )

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

Inserts s at the beginning of the string and returns a reference to the string. @@ -1479,9 +1479,9 @@ This is an overloaded member function, provided for convenience. It behaves esse

Removes every occurrence of str in the string. Returns a reference to the string. -

TQString & TQString::remove ( const TQRegExp & rx ) +

TQString & TQString::remove ( const TQRegExp & rx )

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

Removes every occurrence of the regular expression rx in the +

Removes every occurrence of the regular expression rx in the string. Returns a reference to the string.

This is the same as replace(rx, ""). @@ -1561,7 +1561,7 @@ otherwise the search is case insensitive. -

TQString & TQString::replace ( const TQRegExp & rx, const TQString & after ) +

TQString & TQString::replace ( const TQRegExp & rx, const TQString & after )

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

Replaces every occurrence of the regexp rx in the string with after. Returns a reference to the string. For example: @@ -1571,7 +1571,7 @@ otherwise the search is case insensitive. // s == "ba" -

For regexps containing capturing +

For regexps containing capturing parentheses, occurrences of \1, \2, ..., in after are replaced with rx.cap(1), cap(2), ...

@@ -1580,7 +1580,7 @@ in after are replaced with rx.cap(1), cap(2), ...
     // t == "A \\emph{bon mot}."
   
-

See also find(), findRev(), and TQRegExp::cap(). +

See also find(), findRev(), and TQRegExp::cap().

TQString & TQString::replace ( TQChar c1, TQChar c2 )

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. @@ -1716,12 +1716,12 @@ right-most field being -2, and so on.

See also TQStringList::split(). -

TQString TQString::section ( const TQRegExp & reg, int start, int end = 0xffffffff, int flags = SectionDefault ) const +

TQString TQString::section ( const TQRegExp & reg, int start, int end = 0xffffffff, int flags = SectionDefault ) const

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

This function returns a section of the string.

This string is treated as a sequence of fields separated by the -regular expression, reg. The returned string consists of the +regular expression, reg. The returned string consists of the fields from position start to position end inclusive. If end is not specified, all fields from position start to the end of the string are included. Fields are numbered 0, 1, 2, etc., counting from the left, and -1, -2, etc., counting from right to left. @@ -1731,7 +1731,7 @@ to skip empty fields and how to deal with leading and trailing separators; see SectionFlags.

     TQString line( "forename\tmiddlename  surname \t \t phone" );
-    TQRegExp sep( "\s+" );
+    TQRegExp sep( "\s+" );
     TQString s = line.section( sep, 2, 2 ); // s == "surname"
     
@@ -1740,11 +1740,11 @@ of the string, the right-most field being -1, the one from right-most field being -2, and so on.

     TQString line( "forename\tmiddlename  surname \t \t phone" );
-    TQRegExp sep( "\\s+" );
+    TQRegExp sep( "\\s+" );
     TQString s = line.section( sep, -3, -2 ); // s == "middlename  surname"
     
-

Warning: Using this TQRegExp version is much more expensive than +

Warning: Using this TQRegExp version is much more expensive than the overloaded string and character versions.

See also TQStringList::split() and simplifyWhiteSpace(). @@ -2223,7 +2223,7 @@ Returns an uppercase copy of the string.

See also lower().

Examples: scribble/scribble.cpp and sql/overview/custom1/main.cpp. -

TQCString TQString::utf8 () const +

TQCString TQString::utf8 () const

Returns the string encoded in UTF-8 format.

See TQTextCodec for more diverse coding/decoding of Unicode strings. -- cgit v1.2.3