diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-02-14 11:21:21 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-02-14 11:21:21 +0000 |
commit | 2334bdc0e61e87e6fcda036b81360cfd81e4deab (patch) | |
tree | 129152940f91e431b422e0b121f0b50a7f5dc5ac /sal/rtl | |
parent | f3ca6f1b5af9a0016f552cc24ab901fd13185877 (diff) |
move this into comphelper
Diffstat (limited to 'sal/rtl')
-rw-r--r-- | sal/rtl/source/strtmpl.c | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/sal/rtl/source/strtmpl.c b/sal/rtl/source/strtmpl.c index 7613288401fc..bf3f4fd44600 100644 --- a/sal/rtl/source/strtmpl.c +++ b/sal/rtl/source/strtmpl.c @@ -60,8 +60,6 @@ inline void rtl_str_ImplCopy( IMPL_RTL_STRCODE* pDest, } \ } -#define IS_DIGIT(CHAR) (((CHAR) >= 48) && ((CHAR <= 57))) - /* ======================================================================= */ /* C-String functions which could be used without the String-Class */ /* ======================================================================= */ @@ -93,51 +91,6 @@ sal_Int32 SAL_CALL IMPL_RTL_STRNAME( compare )( const IMPL_RTL_STRCODE* pStr1, /* ----------------------------------------------------------------------- */ -sal_Int32 SAL_CALL IMPL_RTL_STRNAME( compare_Numeric )( const IMPL_RTL_STRCODE* pStr1, - const IMPL_RTL_STRCODE* pStr2 ) -{ - sal_Int32 nRet; - do { - while ( ((nRet = ((sal_Int32)(IMPL_RTL_USTRCODE(*pStr1)))- - ((sal_Int32)(IMPL_RTL_USTRCODE(*pStr2)))) == 0) && - *pStr2 ) - { - pStr1++; - pStr2++; - } - - if(*pStr1 && *pStr2) - { - IMPL_RTL_STRCODE c1 = (sal_Int32)IMPL_RTL_USTRCODE( *pStr1 ); - IMPL_RTL_STRCODE c2 = (sal_Int32)IMPL_RTL_USTRCODE( *pStr2 ); - sal_Int64 number1 = 0; - sal_Int64 number2 = 0; - if(IS_DIGIT(c1) && IS_DIGIT(c2)) - { - do - { - number1 = number1 * 10 + (c1 - '0'); - pStr1++; - c1 = (sal_Int32)IMPL_RTL_USTRCODE( *pStr1 ); - } while(IS_DIGIT(c1)); - - do - { - number2 = number2 * 10 + (c2 - '0'); - pStr2++; - c2 = (sal_Int32)IMPL_RTL_USTRCODE( *pStr2 ); - } while(IS_DIGIT(c2)); - - nRet = number1 - number2; - } - } - } while(nRet == 0 && *pStr1 && *pStr2); - - return nRet; -} - -/* ----------------------------------------------------------------------- */ - sal_Int32 SAL_CALL IMPL_RTL_STRNAME( compare_WithLength )( const IMPL_RTL_STRCODE* pStr1, sal_Int32 nStr1Len, const IMPL_RTL_STRCODE* pStr2, |