diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-06-11 13:15:18 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-06-11 14:46:46 +0100 |
commit | 8f5629fd5aafc85e509a4160a11a285b0a66e7c0 (patch) | |
tree | 143883c85467b5ce9f5c665338e0f8a25067a0cd /tools | |
parent | 2106d8e648449d34b195068eef5f672a14ea64a8 (diff) |
remove EraseLeadingChars and EraseTrailingChars
Change-Id: Ib9797fe97cd008cc6508ce8cec47dc5373416892
Diffstat (limited to 'tools')
-rw-r--r-- | tools/inc/tools/string.hxx | 3 | ||||
-rw-r--r-- | tools/source/string/tustring.cxx | 32 |
2 files changed, 0 insertions, 35 deletions
diff --git a/tools/inc/tools/string.hxx b/tools/inc/tools/string.hxx index 5b3f2707ec7c..9ab1540db54c 100644 --- a/tools/inc/tools/string.hxx +++ b/tools/inc/tools/string.hxx @@ -245,9 +245,6 @@ public: UniString& Fill( xub_StrLen nCount, sal_Unicode cFillChar = ' ' ); UniString& Expand( xub_StrLen nCount, sal_Unicode cExpandChar = ' ' ); - UniString& EraseLeadingChars( sal_Unicode c = ' ' ); - UniString& EraseTrailingChars( sal_Unicode c = ' ' ); - UniString& ToLowerAscii(); UniString& ToUpperAscii(); diff --git a/tools/source/string/tustring.cxx b/tools/source/string/tustring.cxx index 130f6d48ee65..05da7296c7c1 100644 --- a/tools/source/string/tustring.cxx +++ b/tools/source/string/tustring.cxx @@ -553,38 +553,6 @@ STRING::STRING( STRCODE c ) // ----------------------------------------------------------------------- -STRING& STRING::EraseLeadingChars( STRCODE c ) -{ - DBG_CHKTHIS( STRING, DBGCHECKSTRING ); - - if ( mpData->maStr[0] != c ) - return *this; - - xub_StrLen nStart = 0; - while ( mpData->maStr[nStart] == c ) - ++nStart; - - return Erase( 0, nStart ); -} - -// ----------------------------------------------------------------------- - -STRING& STRING::EraseTrailingChars( STRCODE c ) -{ - DBG_CHKTHIS( STRING, DBGCHECKSTRING ); - - sal_Int32 nEnd = mpData->mnLen; - while ( nEnd && (mpData->maStr[nEnd-1] == c) ) - nEnd--; - - if ( nEnd != mpData->mnLen ) - Erase( static_cast< xub_StrLen >(nEnd) ); - - return *this; -} - -// ----------------------------------------------------------------------- - STRING& STRING::Insert( STRCODE c, xub_StrLen nIndex ) { DBG_CHKTHIS( STRING, DBGCHECKSTRING ); |