diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-02-16 20:17:18 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-02-16 20:17:18 +0000 |
commit | f4fae92b6768541e2952173c3d4b09040f95bf7e (patch) | |
tree | d8c5d93232235cd635f3310b4d95490df181ba2d /mimelib/dwstring.cpp | |
parent | 125c0a08265b75a133644d3b55f47e37c919f45d (diff) | |
download | tdepim-f4fae92b6768541e2952173c3d4b09040f95bf7e.tar.gz tdepim-f4fae92b6768541e2952173c3d4b09040f95bf7e.zip |
Moved kpilot from kdepim to applications, as the core Trinity libraries should not contain hardware-dependent software
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1221127 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'mimelib/dwstring.cpp')
-rw-r--r-- | mimelib/dwstring.cpp | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/mimelib/dwstring.cpp b/mimelib/dwstring.cpp index 749f7c8ee..52e42befb 100644 --- a/mimelib/dwstring.cpp +++ b/mimelib/dwstring.cpp @@ -365,7 +365,7 @@ DwString::DwString(const char* aBuf, size_t aLen) mRep = new_rep_reference(sEmptyRep); mStart = 0; mLength = 0; - _replace(0, mLength, aBuf, aLen); + _tqreplace(0, mLength, aBuf, aLen); } @@ -400,7 +400,7 @@ DwString::DwString(const char* aCstr) mLength = 0; if ( aCstr ) { size_t len = strlen(aCstr); - _replace(0, mLength, aCstr, len); + _tqreplace(0, mLength, aCstr, len); } } @@ -418,7 +418,7 @@ DwString::DwString(size_t aLen, char aChar) mRep = new_rep_reference(sEmptyRep); mStart = 0; mLength = 0; - _replace(0, mLength, aLen, aChar); + _tqreplace(0, mLength, aLen, aChar); } @@ -476,7 +476,7 @@ void DwString::resize(size_t aLen, char aChar) } // expanding string else if (aLen > mLength) { - _replace(mLength, 0, aLen-mLength, aChar); + _tqreplace(mLength, 0, aLen-mLength, aChar); } } @@ -534,10 +534,10 @@ DwString& DwString::append(const DwString& aStr, size_t aPos, size_t len = DW_MIN(aLen, aStr.mLength - pos); if (&aStr == this) { DwString temp(aStr); - _replace(mLength, 0, &temp.mRep->mBuffer[temp.mStart+pos], len); + _tqreplace(mLength, 0, &temp.mRep->mBuffer[temp.mStart+pos], len); } else { - _replace(mLength, 0, &aStr.mRep->mBuffer[aStr.mStart+pos], len); + _tqreplace(mLength, 0, &aStr.mRep->mBuffer[aStr.mStart+pos], len); } return *this; } @@ -547,7 +547,7 @@ DwString& DwString::append(const char* aBuf, size_t aLen) { assert(aBuf != 0); if (aBuf != 0) { - _replace(mLength, 0, aBuf, aLen); + _tqreplace(mLength, 0, aBuf, aLen); } return *this; } @@ -557,14 +557,14 @@ DwString& DwString::append(const char* aCstr) { assert(aCstr != 0); size_t len = (aCstr) ? strlen(aCstr) : 0; - _replace(mLength, 0, aCstr, len); + _tqreplace(mLength, 0, aCstr, len); return *this; } DwString& DwString::append(size_t aLen, char aChar) { - _replace(mLength, 0, aLen, aChar); + _tqreplace(mLength, 0, aLen, aChar); return *this; } @@ -601,7 +601,7 @@ DwString& DwString::assign(const char* aBuf, size_t aLen) { assert(aBuf != 0); assert(aLen != (size_t)-1); - _replace(0, mLength, aBuf, aLen); + _tqreplace(0, mLength, aBuf, aLen); return *this; } @@ -610,7 +610,7 @@ DwString& DwString::assign(const char* aCstr) { assert(aCstr != 0); size_t len = (aCstr) ? strlen(aCstr) : 0; - _replace(0, mLength, aCstr, len); + _tqreplace(0, mLength, aCstr, len); return *this; } @@ -618,7 +618,7 @@ DwString& DwString::assign(const char* aCstr) DwString& DwString::assign(size_t aLen, char aChar) { assert(aLen != (size_t)-1); - _replace(0, mLength, aLen, aChar); + _tqreplace(0, mLength, aLen, aChar); return *this; } @@ -638,10 +638,10 @@ DwString& DwString::insert(size_t aPos1, const DwString& aStr, size_t len2 = DW_MIN(aLen2, aStr.mLength - pos2); if (&aStr == this) { DwString temp(aStr); - _replace(aPos1, 0, &temp.mRep->mBuffer[temp.mStart+pos2], len2); + _tqreplace(aPos1, 0, &temp.mRep->mBuffer[temp.mStart+pos2], len2); } else { - _replace(aPos1, 0, &aStr.mRep->mBuffer[aStr.mStart+pos2], len2); + _tqreplace(aPos1, 0, &aStr.mRep->mBuffer[aStr.mStart+pos2], len2); } return *this; } @@ -650,7 +650,7 @@ DwString& DwString::insert(size_t aPos1, const DwString& aStr, DwString& DwString::insert(size_t aPos, const char* aBuf, size_t aLen) { assert(aBuf != 0); - _replace(aPos, 0, aBuf, aLen); + _tqreplace(aPos, 0, aBuf, aLen); return *this; } @@ -659,14 +659,14 @@ DwString& DwString::insert(size_t aPos, const char* aCstr) { assert(aCstr != 0); size_t len = (aCstr) ? strlen(aCstr) : 0; - _replace(aPos, 0, aCstr, len); + _tqreplace(aPos, 0, aCstr, len); return *this; } DwString& DwString::insert(size_t aPos, size_t aLen, char aChar) { - _replace(aPos, 0, aLen, aChar); + _tqreplace(aPos, 0, aLen, aChar); return *this; } @@ -676,18 +676,18 @@ DwString& DwString::erase(size_t aPos, size_t aLen) assert(aPos <= mLength); size_t pos = DW_MIN(aPos, mLength); size_t len = DW_MIN(aLen, mLength - pos); - _replace(pos, len, "", 0); + _tqreplace(pos, len, "", 0); return *this; } -DwString& DwString::replace(size_t aPos1, size_t aLen1, const DwString& aStr) +DwString& DwString::tqreplace(size_t aPos1, size_t aLen1, const DwString& aStr) { - return replace(aPos1, aLen1, aStr, 0, aStr.mLength); + return tqreplace(aPos1, aLen1, aStr, 0, aStr.mLength); } -DwString& DwString::replace(size_t aPos1, size_t aLen1, const DwString& aStr, +DwString& DwString::tqreplace(size_t aPos1, size_t aLen1, const DwString& aStr, size_t aPos2, size_t aLen2) { assert(aPos2 <= aStr.mLength); @@ -695,35 +695,35 @@ DwString& DwString::replace(size_t aPos1, size_t aLen1, const DwString& aStr, size_t len2 = DW_MIN(aLen2, aStr.mLength - pos2); if (&aStr == this) { DwString temp(aStr); - _replace(aPos1, aLen1, &temp.mRep->mBuffer[temp.mStart+pos2], len2); + _tqreplace(aPos1, aLen1, &temp.mRep->mBuffer[temp.mStart+pos2], len2); } else { - _replace(aPos1, aLen1, &aStr.mRep->mBuffer[aStr.mStart+pos2], len2); + _tqreplace(aPos1, aLen1, &aStr.mRep->mBuffer[aStr.mStart+pos2], len2); } return *this; } -DwString& DwString::replace(size_t aPos1, size_t aLen1, const char* aBuf, +DwString& DwString::tqreplace(size_t aPos1, size_t aLen1, const char* aBuf, size_t aLen2) { - _replace(aPos1, aLen1, aBuf, aLen2); + _tqreplace(aPos1, aLen1, aBuf, aLen2); return *this; } -DwString& DwString::replace(size_t aPos1, size_t aLen1, const char* aCstr) +DwString& DwString::tqreplace(size_t aPos1, size_t aLen1, const char* aCstr) { size_t len2 = (aCstr) ? strlen(aCstr) : 0; - _replace(aPos1, aLen1, aCstr, len2); + _tqreplace(aPos1, aLen1, aCstr, len2); return *this; } -DwString& DwString::replace(size_t aPos1, size_t aLen1, size_t aLen2, +DwString& DwString::tqreplace(size_t aPos1, size_t aLen1, size_t aLen2, char aChar) { - _replace(aPos1, aLen1, aLen2, aChar); + _tqreplace(aPos1, aLen1, aLen2, aChar); return *this; } @@ -1246,7 +1246,7 @@ void DwString::_copy() } -void DwString::_replace(size_t aPos1, size_t aLen1, const char* aBuf, size_t aLen2) +void DwString::_tqreplace(size_t aPos1, size_t aLen1, const char* aBuf, size_t aLen2) { assert(aPos1 <= mLength); assert(aBuf != 0); @@ -1291,7 +1291,7 @@ void DwString::_replace(size_t aPos1, size_t aLen1, const char* aBuf, size_t aLe } } } - // Is the replacement smaller than the replaced? + // Is the tqreplacement smaller than the tqreplaced? else if (len2 < len1) { to = mRep->mBuffer + mStart + pos1; from = aBuf; @@ -1338,7 +1338,7 @@ void DwString::_replace(size_t aPos1, size_t aLen1, const char* aBuf, size_t aLe } -void DwString::_replace(size_t aPos1, size_t aLen1, size_t aLen2, char aChar) +void DwString::_tqreplace(size_t aPos1, size_t aLen1, size_t aLen2, char aChar) { assert(aPos1 <= mLength); size_t pos1 = DW_MIN(aPos1, mLength); @@ -1381,7 +1381,7 @@ void DwString::_replace(size_t aPos1, size_t aLen1, size_t aLen2, char aChar) } } } - // Is the replacement smaller than the replaced? + // Is the tqreplacement smaller than the tqreplaced? else if (len2 < len1) { to = mRep->mBuffer + mStart + pos1; for (i=0; i < len2; ++i) *to++ = aChar; |