diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-10-09 09:50:37 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-10-09 13:17:27 +0100 |
commit | 5089bdb234a93bcb62b597c18b8ab66048246b13 (patch) | |
tree | 0983967d89d9662b8484c88d2590cfdd7362fa43 /tools | |
parent | 0ba03a38f022ca8d3705ae1370bb1d739e1e973f (diff) |
Related: fdo#38838 remove UniString::EqualsAscii
Change-Id: I55c85c1c44452c7fb6ac40591aea7177d054affe
Diffstat (limited to 'tools')
-rw-r--r-- | tools/source/string/strascii.cxx | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/tools/source/string/strascii.cxx b/tools/source/string/strascii.cxx index 56e7122b5060..5ae3967badf0 100644 --- a/tools/source/string/strascii.cxx +++ b/tools/source/string/strascii.cxx @@ -47,19 +47,6 @@ static void ImplCopyAsciiStr( sal_Unicode* pDest, const sal_Char* pSrc, } } -static sal_Int32 ImplStringCompareAscii( const sal_Unicode* pStr1, const sal_Char* pStr2 ) -{ - sal_Int32 nRet; - while ( ((nRet = ((sal_Int32)*pStr1)-((sal_Int32)((unsigned char)*pStr2))) == 0) && - *pStr2 ) - { - ++pStr1, - ++pStr2; - } - - return nRet; -} - static sal_Int32 ImplStringCompareAscii( const sal_Unicode* pStr1, const sal_Char* pStr2, xub_StrLen nCount ) { @@ -181,29 +168,6 @@ StringCompare UniString::CompareToAscii( const sal_Char* pAsciiStr, return COMPARE_GREATER; } -sal_Bool UniString::EqualsAscii( const sal_Char* pAsciiStr ) const -{ - DBG_CHKTHIS( UniString, DbgCheckUniString ); - DBG_ASSERT( ImplDbgCheckAsciiStr( pAsciiStr, STRING_LEN ), - "UniString::EqualsAscii() - pAsciiStr include characters > 127" ); - - return (ImplStringCompareAscii( mpData->maStr, pAsciiStr ) == 0); -} - -sal_Bool UniString::EqualsAscii( const sal_Char* pAsciiStr, - xub_StrLen nIndex, xub_StrLen nLen ) const -{ - DBG_CHKTHIS( UniString, DbgCheckUniString ); - DBG_ASSERT( ImplDbgCheckAsciiStr( pAsciiStr, nLen ), - "UniString::EqualsAscii() - pAsciiStr include characters > 127" ); - - // Are there enough codes for comparing? - if ( nIndex > mpData->mnLen ) - return (*pAsciiStr == 0); - - return (ImplStringCompareAscii( mpData->maStr+nIndex, pAsciiStr, nLen ) == 0); -} - xub_StrLen UniString::SearchAscii( const sal_Char* pAsciiStr, xub_StrLen nIndex ) const { DBG_CHKTHIS( UniString, DbgCheckUniString ); |