summaryrefslogtreecommitdiffstats
path: root/libkdepim/kregexp3.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libkdepim/kregexp3.cpp')
-rw-r--r--libkdepim/kregexp3.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/libkdepim/kregexp3.cpp b/libkdepim/kregexp3.cpp
index 6bb519e5..f34dad33 100644
--- a/libkdepim/kregexp3.cpp
+++ b/libkdepim/kregexp3.cpp
@@ -37,13 +37,13 @@
#include <kdebug.h>
#endif
-TQString KRegExp3::replace( const TQString & str,
- const TQString & replacementStr,
+TQString KRegExp3::tqreplace( const TQString & str,
+ const TQString & tqreplacementStr,
int start, bool global )
{
int oldpos, pos;
- //-------- parsing the replacementStr into
+ //-------- parsing the tqreplacementStr into
//-------- literal parts and backreferences:
TQStringList literalStrs;
TQValueList<int> backRefs;
@@ -55,30 +55,30 @@ TQString KRegExp3::replace( const TQString & str,
TQRegExp brx("\\");
#ifdef DEBUG_KREGEXP3
- kdDebug() << "Analyzing replacementStr: \"" + replacementStr + "\"" << endl;
+ kdDebug() << "Analyzing tqreplacementStr: \"" + tqreplacementStr + "\"" << endl;
#endif
oldpos = 0;
pos = 0;
while ( true ) {
- pos = rx.search( replacementStr, pos );
+ pos = rx.search( tqreplacementStr, pos );
#ifdef DEBUG_KREGEXP3
kdDebug() << TQString(" Found match at pos %1").arg(pos) << endl;
#endif
if ( pos < 0 ) {
- literalStrs << replacementStr.mid( oldpos )
- .replace( bbrx, "\\" )
- .replace( brx, "" );
+ literalStrs << tqreplacementStr.mid( oldpos )
+ .tqreplace( bbrx, "\\" )
+ .tqreplace( brx, "" );
#ifdef DEBUG_KREGEXP3
kdDebug() << " No more matches. Last literal is \"" + literalStrs.last() + "\"" << endl;
#endif
break;
} else {
- literalStrs << replacementStr.mid( oldpos, pos-oldpos )
- .replace( bbrx, "\\" )
- .replace( brx, "" );
+ literalStrs << tqreplacementStr.mid( oldpos, pos-oldpos )
+ .tqreplace( bbrx, "\\" )
+ .tqreplace( brx, "" );
#ifdef DEBUG_KREGEXP3
kdDebug() << TQString(" Inserting \"") + literalStrs.last() + "\" as literal." << endl;
kdDebug() << " Searching for corresponding digit(s):" << endl;
@@ -101,7 +101,7 @@ TQString KRegExp3::replace( const TQString & str,
}
#ifdef DEBUG_KREGEXP3
- kdDebug() << "Finished the analysis of replacementStr!" << endl;
+ kdDebug() << "Finished the analysis of tqreplacementStr!" << endl;
#endif
Q_ASSERT( literalStrs.count() == backRefs.count() + 1 );
@@ -145,7 +145,7 @@ TQString KRegExp3::replace( const TQString & str,
iIt != backRefs.end() ; ++sIt, ++iIt ) {
result += (*sIt);
#ifdef DEBUG_KREGEXP3
- kdDebug() << " Adding literal replacement part:" << endl;
+ kdDebug() << " Adding literal tqreplacement part:" << endl;
kdDebug() << " result == \"" + result + "\"" << endl;
#endif
result += cap( (*iIt) );
@@ -156,7 +156,7 @@ TQString KRegExp3::replace( const TQString & str,
}
result += (*sIt);
#ifdef DEBUG_KREGEXP3
- kdDebug() << " Adding literal replacement part:" << endl;
+ kdDebug() << " Adding literal tqreplacement part:" << endl;
kdDebug() << " result == \"" + result + "\"" << endl;
#endif
}
@@ -173,7 +173,7 @@ TQString KRegExp3::replace( const TQString & str,
oldpos = pos;
if ( !global ) {
- // only replace the first occurrence, so stop here:
+ // only tqreplace the first occurrence, so stop here:
result += str.mid( oldpos );
break;
}