diff options
Diffstat (limited to 'src/tools/qcstring.cpp')
-rw-r--r-- | src/tools/qcstring.cpp | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/src/tools/qcstring.cpp b/src/tools/qcstring.cpp index 60e698f34..8e7a1d14d 100644 --- a/src/tools/qcstring.cpp +++ b/src/tools/qcstring.cpp @@ -105,7 +105,7 @@ char *qstrdup( const char *src ) if ( !src ) return 0; char *dst = new char[strlen(src)+1]; - Q_CHECK_PTR( dst ); + TQ_CHECK_PTR( dst ); return strcpy( dst, src ); } @@ -144,7 +144,7 @@ char *qstrncpy( char *dst, const char *src, uint len ) } /*! - \fn uint qstrlen( const char *str ); + \fn uint tqstrlen( const char *str ); \relates TQCString @@ -170,12 +170,12 @@ char *qstrncpy( char *dst, const char *src, uint len ) Special case II: Returns a random nonzero value if \a str1 is 0 or \a str2 is 0 (but not both). - \sa qstrncmp() qstricmp() qstrnicmp() + \sa tqstrncmp() qstricmp() qstrnicmp() \link #asciinotion Note on character comparisons \endlink */ /*! - \fn int qstrncmp( const char *str1, const char *str2, uint len ); + \fn int tqstrncmp( const char *str1, const char *str2, uint len ); \relates TQCString @@ -212,7 +212,7 @@ char *qstrncpy( char *dst, const char *src, uint len ) Special case II: Returns a random nonzero value if \a str1 is 0 or \a str2 is 0 (but not both). - \sa qstrcmp(), qstrncmp(), qstrnicmp() + \sa qstrcmp(), tqstrncmp(), qstrnicmp() \link #asciinotion Note on character comparisons \endlink */ @@ -246,7 +246,7 @@ int qstricmp( const char *str1, const char *str2 ) Special case II: Returns a random nonzero value if \a str1 is 0 or \a str2 is 0 (but not both). - \sa qstrcmp(), qstrncmp() qstricmp() + \sa qstrcmp(), tqstrncmp() qstricmp() \link #asciinotion Note on character comparisons \endlink */ @@ -342,7 +342,7 @@ Q_UINT16 qChecksum( const char *data, uint len ) Compresses the array \a data and returns the compressed byte array using zlib. - \sa qUncompress() + \sa tqUncompress() */ /*! @@ -401,7 +401,7 @@ TQByteArray qCompress( const uchar* data, int nbytes ) #endif /*! - \fn TQByteArray qUncompress( const TQByteArray& data ) + \fn TQByteArray tqUncompress( const TQByteArray& data ) \relates TQByteArray @@ -429,7 +429,7 @@ TQByteArray qCompress( const uchar* data, int nbytes ) */ #ifndef QT_NO_COMPRESS -TQByteArray qUncompress( const uchar* data, int nbytes ) +TQByteArray tqUncompress( const uchar* data, int nbytes ) { if ( !data ) { #if defined(QT_CHECK_RANGE) @@ -699,7 +699,7 @@ TQCString::TQCString( int size ) TQCString::TQCString( const char *str ) { - duplicate( str, qstrlen(str) + 1 ); + duplicate( str, tqstrlen(str) + 1 ); } @@ -887,7 +887,7 @@ TQCString &TQCString::sprintf( const char *format, ... ) #else vsprintf( data(), format, ap ); #endif - resize( qstrlen(data()) + 1 ); // truncate + resize( tqstrlen(data()) + 1 ); // truncate va_end( ap ); return *this; } @@ -987,7 +987,7 @@ int TQCString::find( const char *str, int index, bool cs, uint l ) const return -1; if ( !*str ) return index; - const uint sl = qstrlen( str ); + const uint sl = tqstrlen( str ); if ( sl + index > l ) return -1; @@ -1013,7 +1013,7 @@ int TQCString::find( const char *str, int index, bool cs, uint l ) const while ( haystack <= end ) { hashHaystack += *(haystack+sl_minus_1); if ( hashHaystack == hashNeedle && *needle == *haystack - && qstrncmp( needle, haystack, sl ) == 0 ) + && tqstrncmp( needle, haystack, sl ) == 0 ) return haystack - data(); REHASH( *haystack ); @@ -1094,7 +1094,7 @@ int TQCString::findRev( const char *str, int index, bool cs ) const /* See TQString::find() for explanations. */ - const uint sl = qstrlen( str ); + const uint sl = tqstrlen( str ); const uint l = length(); int delta = l-sl; if ( index < 0 ) @@ -1123,7 +1123,7 @@ int TQCString::findRev( const char *str, int index, bool cs ) const hashHaystack -= *haystack; while ( haystack >= end ) { hashHaystack += *haystack; - if ( hashHaystack == hashNeedle && qstrncmp( needle, haystack, sl ) == 0 ) + if ( hashHaystack == hashNeedle && tqstrncmp( needle, haystack, sl ) == 0 ) return haystack-data(); --haystack; REHASH( *(haystack+sl) ); @@ -1283,7 +1283,7 @@ TQCString TQCString::right( uint len ) const TQCString TQCString::mid( uint index, uint len ) const { - uint slen = qstrlen( data() ); + uint slen = tqstrlen( data() ); if ( isEmpty() || index >= slen ) { TQCString empty; return empty; @@ -1319,7 +1319,7 @@ TQCString TQCString::mid( uint index, uint len ) const TQCString TQCString::leftJustify( uint width, char fill, bool truncate ) const { TQCString result; - int len = qstrlen(data()); + int len = tqstrlen(data()); int padlen = width - len; if ( padlen > 0 ) { result.TQByteArray::resize( len+padlen+1 ); @@ -1357,7 +1357,7 @@ TQCString TQCString::leftJustify( uint width, char fill, bool truncate ) const TQCString TQCString::rightJustify( uint width, char fill, bool truncate ) const { TQCString result; - int len = qstrlen(data()); + int len = tqstrlen(data()); int padlen = width - len; if ( padlen > 0 ) { result.TQByteArray::resize( len+padlen+1 ); @@ -1534,7 +1534,7 @@ TQCString TQCString::simplifyWhiteSpace() const TQCString &TQCString::insert( uint index, const char *s ) { - int len = qstrlen(s); + int len = tqstrlen(s); if ( len == 0 ) return *this; uint olen = length(); @@ -2090,7 +2090,7 @@ TQCString &TQCString::setStr( const char *str ) { detach(); if ( str ) // valid string - store( str, qstrlen(str)+1 ); + store( str, tqstrlen(str)+1 ); else // empty resize( 0 ); return *this; @@ -2122,7 +2122,7 @@ TQCString &TQCString::setNum( long n ) } while ( n ); if ( neg ) *--p = '-'; - store( p, qstrlen(p)+1 ); + store( p, tqstrlen(p)+1 ); return *this; } @@ -2143,7 +2143,7 @@ TQCString &TQCString::setNum( ulong n ) *--p = ((int)(n%10)) + '0'; n /= 10; } while ( n ); - store( p, qstrlen(p)+1 ); + store( p, tqstrlen(p)+1 ); return *this; } @@ -2263,7 +2263,7 @@ TQCString& TQCString::operator+=( const char *str ) return *this; // nothing to append detach(); uint len1 = length(); - uint len2 = qstrlen(str); + uint len2 = tqstrlen(str); if ( !TQByteArray::resize( len1 + len2 + 1, TQByteArray::SpeedOptim ) ) return *this; // no memory memcpy( data() + len1, str, len2 + 1 ); |