summaryrefslogtreecommitdiff
path: root/tools/source
diff options
context:
space:
mode:
Diffstat (limited to 'tools/source')
-rw-r--r--tools/source/string/strimp.cxx63
1 files changed, 0 insertions, 63 deletions
diff --git a/tools/source/string/strimp.cxx b/tools/source/string/strimp.cxx
index 99a2778d2db4..a0d6ccaf67a6 100644
--- a/tools/source/string/strimp.cxx
+++ b/tools/source/string/strimp.cxx
@@ -244,67 +244,4 @@ STRING& STRING::Insert( const STRING& rStr, xub_StrLen nIndex )
return *this;
}
-xub_StrLen STRING::Search( STRCODE c, xub_StrLen nIndex ) const
-{
- DBG_CHKTHIS( STRING, DBGCHECKSTRING );
-
- sal_Int32 nLen = mpData->mnLen;
- const STRCODE* pStr = mpData->maStr;
- pStr += nIndex;
- while ( nIndex < nLen )
- {
- if ( *pStr == c )
- return nIndex;
- ++pStr,
- ++nIndex;
- }
-
- return STRING_NOTFOUND;
-}
-
-xub_StrLen STRING::Search( const STRING& rStr, xub_StrLen nIndex ) const
-{
- DBG_CHKTHIS( STRING, DBGCHECKSTRING );
- DBG_CHKOBJ( &rStr, STRING, DBGCHECKSTRING );
-
- sal_Int32 nLen = mpData->mnLen;
- sal_Int32 nStrLen = rStr.mpData->mnLen;
-
- // rStr was not found if its length is zero
- // or index is larger than searched string
- if ( !nStrLen || (nIndex >= nLen) )
- return STRING_NOTFOUND;
-
- const STRCODE* pStr1 = mpData->maStr;
- pStr1 += nIndex;
-
- if ( nStrLen == 1 )
- {
- STRCODE cSearch = rStr.mpData->maStr[0];
- while ( nIndex < nLen )
- {
- if ( *pStr1 == cSearch )
- return nIndex;
- ++pStr1,
- ++nIndex;
- }
- }
- else
- {
- const STRCODE* pStr2 = rStr.mpData->maStr;
-
- // search only within string
- while ( nLen - nIndex >= nStrLen )
- {
- // increase match if found
- if ( ImplStringCompareWithoutZero( pStr1, pStr2, nStrLen ) == 0 )
- return nIndex;
- ++pStr1,
- ++nIndex;
- }
- }
-
- return STRING_NOTFOUND;
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */