diff options
Diffstat (limited to 'sal/rtl/ustring.cxx')
-rw-r--r-- | sal/rtl/ustring.cxx | 237 |
1 files changed, 96 insertions, 141 deletions
diff --git a/sal/rtl/ustring.cxx b/sal/rtl/ustring.cxx index fe9795710b50..d24a0fed3465 100644 --- a/sal/rtl/ustring.cxx +++ b/sal/rtl/ustring.cxx @@ -52,14 +52,14 @@ sal_Int32 rtl_ustr_indexOfAscii_WithLength( sal_Unicode const * str, sal_Int32 len, - char const * subStr, sal_Int32 subLen) SAL_THROW_EXTERN_C() + char const * subStr, sal_Int32 subLen) noexcept { return rtl::str::indexOfStr_WithLength(str, len, subStr, subLen); } sal_Int32 rtl_ustr_lastIndexOfAscii_WithLength( sal_Unicode const * str, sal_Int32 len, - char const * subStr, sal_Int32 subLen) SAL_THROW_EXTERN_C() + char const * subStr, sal_Int32 subLen) noexcept { assert(len >= 0); assert(subLen >= 0); @@ -76,14 +76,12 @@ sal_Int32 rtl_ustr_lastIndexOfAscii_WithLength( return -1; } -sal_Int32 SAL_CALL rtl_ustr_valueOfFloat(sal_Unicode * pStr, float f) - SAL_THROW_EXTERN_C() +sal_Int32 SAL_CALL rtl_ustr_valueOfFloat(sal_Unicode * pStr, float f) noexcept { return rtl::str::valueOfFP<RTL_USTR_MAX_VALUEOFFLOAT>(pStr, f); } -sal_Int32 SAL_CALL rtl_ustr_valueOfDouble(sal_Unicode * pStr, double d) - SAL_THROW_EXTERN_C() +sal_Int32 SAL_CALL rtl_ustr_valueOfDouble(sal_Unicode * pStr, double d) noexcept { return rtl::str::valueOfFP<RTL_USTR_MAX_VALUEOFDOUBLE>(pStr, d); } @@ -96,7 +94,7 @@ float doubleToFloat(double x) { } -float SAL_CALL rtl_ustr_toFloat(sal_Unicode const * pStr) SAL_THROW_EXTERN_C() +float SAL_CALL rtl_ustr_toFloat(sal_Unicode const * pStr) noexcept { assert(pStr); return doubleToFloat(rtl_math_uStringToDouble(pStr, @@ -104,7 +102,7 @@ float SAL_CALL rtl_ustr_toFloat(sal_Unicode const * pStr) SAL_THROW_EXTERN_C() '.', 0, nullptr, nullptr)); } -double SAL_CALL rtl_ustr_toDouble(sal_Unicode const * pStr) SAL_THROW_EXTERN_C() +double SAL_CALL rtl_ustr_toDouble(sal_Unicode const * pStr) noexcept { assert(pStr); return rtl_math_uStringToDouble(pStr, pStr + rtl_ustr_getLength(pStr), '.', @@ -114,8 +112,7 @@ double SAL_CALL rtl_ustr_toDouble(sal_Unicode const * pStr) SAL_THROW_EXTERN_C() /* ======================================================================= */ sal_Int32 SAL_CALL rtl_ustr_ascii_compare( const sal_Unicode* pStr1, - const char* pStr2 ) - SAL_THROW_EXTERN_C() + const char* pStr2 ) noexcept { return rtl::str::compare(rtl::str::null_terminated(pStr1), rtl::str::null_terminated(pStr2), rtl::str::CompareNormal(), rtl::str::noShortening); @@ -125,8 +122,7 @@ sal_Int32 SAL_CALL rtl_ustr_ascii_compare( const sal_Unicode* pStr1, sal_Int32 SAL_CALL rtl_ustr_ascii_compare_WithLength( const sal_Unicode* pStr1, sal_Int32 nStr1Len, - const char* pStr2 ) - SAL_THROW_EXTERN_C() + const char* pStr2 ) noexcept { return rtl::str::compare(rtl::str::with_length(pStr1, nStr1Len), rtl::str::null_terminated(pStr2), @@ -138,8 +134,7 @@ sal_Int32 SAL_CALL rtl_ustr_ascii_compare_WithLength( const sal_Unicode* pStr1, sal_Int32 SAL_CALL rtl_ustr_ascii_shortenedCompare_WithLength( const sal_Unicode* pStr1, sal_Int32 nStr1Len, const char* pStr2, - sal_Int32 nShortenedLength ) - SAL_THROW_EXTERN_C() + sal_Int32 nShortenedLength ) noexcept { return rtl::str::compare(rtl::str::with_length(pStr1, nStr1Len), rtl::str::null_terminated(pStr2), @@ -151,8 +146,7 @@ sal_Int32 SAL_CALL rtl_ustr_ascii_shortenedCompare_WithLength( const sal_Unicode sal_Int32 SAL_CALL rtl_ustr_asciil_reverseCompare_WithLength( const sal_Unicode* pStr1, sal_Int32 nStr1Len, const char* pStr2, - sal_Int32 nStr2Len ) - SAL_THROW_EXTERN_C() + sal_Int32 nStr2Len ) noexcept { return rtl::str::reverseCompare_WithLengths(pStr1, nStr1Len, pStr2, nStr2Len, rtl::str::CompareNormal()); @@ -162,8 +156,7 @@ sal_Int32 SAL_CALL rtl_ustr_asciil_reverseCompare_WithLength( const sal_Unicode* sal_Bool SAL_CALL rtl_ustr_asciil_reverseEquals_WithLength( const sal_Unicode* pStr1, const char* pStr2, - sal_Int32 nStrLen ) - SAL_THROW_EXTERN_C() + sal_Int32 nStrLen ) noexcept { assert(nStrLen >= 0); const sal_Unicode* pStr1Run = pStr1+nStrLen; @@ -184,8 +177,7 @@ sal_Bool SAL_CALL rtl_ustr_asciil_reverseEquals_WithLength( const sal_Unicode* p /* ----------------------------------------------------------------------- */ sal_Int32 SAL_CALL rtl_ustr_ascii_compareIgnoreAsciiCase( const sal_Unicode* pStr1, - const char* pStr2 ) - SAL_THROW_EXTERN_C() + const char* pStr2 ) noexcept { return rtl::str::compare(rtl::str::null_terminated(pStr1), rtl::str::null_terminated(pStr2), rtl::str::CompareIgnoreAsciiCase(), rtl::str::noShortening); @@ -195,8 +187,7 @@ sal_Int32 SAL_CALL rtl_ustr_ascii_compareIgnoreAsciiCase( const sal_Unicode* pSt sal_Int32 SAL_CALL rtl_ustr_ascii_compareIgnoreAsciiCase_WithLength( const sal_Unicode* pStr1, sal_Int32 nStr1Len, - const char* pStr2 ) - SAL_THROW_EXTERN_C() + const char* pStr2 ) noexcept { return rtl::str::compare(rtl::str::with_length(pStr1, nStr1Len), rtl::str::null_terminated(pStr2), @@ -205,7 +196,7 @@ sal_Int32 SAL_CALL rtl_ustr_ascii_compareIgnoreAsciiCase_WithLength( const sal_U sal_Int32 rtl_ustr_ascii_compareIgnoreAsciiCase_WithLengths( sal_Unicode const * first, sal_Int32 firstLen, - char const * second, sal_Int32 secondLen) SAL_THROW_EXTERN_C() + char const * second, sal_Int32 secondLen) noexcept { return rtl::str::compare(rtl::str::with_length(first, firstLen), rtl::str::with_length(second, secondLen), @@ -217,8 +208,7 @@ sal_Int32 rtl_ustr_ascii_compareIgnoreAsciiCase_WithLengths( sal_Int32 SAL_CALL rtl_ustr_ascii_shortenedCompareIgnoreAsciiCase_WithLength( const sal_Unicode* pStr1, sal_Int32 nStr1Len, const char* pStr2, - sal_Int32 nShortenedLength ) - SAL_THROW_EXTERN_C() + sal_Int32 nShortenedLength ) noexcept { return rtl::str::compare(rtl::str::with_length(pStr1, nStr1Len), rtl::str::null_terminated(pStr2), @@ -228,8 +218,7 @@ sal_Int32 SAL_CALL rtl_ustr_ascii_shortenedCompareIgnoreAsciiCase_WithLength( co /* ----------------------------------------------------------------------- */ void SAL_CALL rtl_uString_newFromAscii( rtl_uString** ppThis, - const char* pCharStr ) - SAL_THROW_EXTERN_C() + const char* pCharStr ) noexcept { assert(ppThis); sal_Int32 nLen = pCharStr ? rtl::str::getLength(pCharStr) : 0; @@ -263,7 +252,7 @@ void SAL_CALL rtl_uString_newFromAscii( rtl_uString** ppThis, void SAL_CALL rtl_uString_newFromCodePoints( rtl_uString ** newString, sal_uInt32 const * codePoints, - sal_Int32 codePointCount) SAL_THROW_EXTERN_C() + sal_Int32 codePointCount) noexcept { sal_Int32 n; sal_Int32 i; @@ -545,7 +534,7 @@ void SAL_CALL rtl_string2UString( rtl_uString** ppThis, const char* pStr, sal_Int32 nLen, rtl_TextEncoding eTextEncoding, - sal_uInt32 nCvtFlags ) SAL_THROW_EXTERN_C() + sal_uInt32 nCvtFlags ) noexcept { assert(ppThis); assert(nLen >= 0); @@ -596,7 +585,7 @@ static void rtl_ustring_intern_internal( rtl_uString ** newStr, } void SAL_CALL rtl_uString_intern( rtl_uString ** newStr, - rtl_uString * str) SAL_THROW_EXTERN_C() + rtl_uString * str) noexcept { assert(newStr); assert(str); @@ -642,8 +631,7 @@ void SAL_CALL rtl_uString_internConvert( rtl_uString ** newStr, sal_Int32 len, rtl_TextEncoding eTextEncoding, sal_uInt32 convertFlags, - sal_uInt32 * pInfo ) - SAL_THROW_EXTERN_C() + sal_uInt32 * pInfo ) noexcept { assert(newStr); assert(len >= 0); @@ -758,7 +746,7 @@ sal_uInt32 SAL_CALL rtl_uString_iterateCodePoints( sal_Bool rtl_convertStringToUString( rtl_uString ** target, char const * source, sal_Int32 length, - rtl_TextEncoding encoding, sal_uInt32 flags) SAL_THROW_EXTERN_C() + rtl_TextEncoding encoding, sal_uInt32 flags) noexcept { assert(target); assert(length >= 0); @@ -769,7 +757,7 @@ sal_Bool rtl_convertStringToUString( void rtl_uString_newReplaceFirst( rtl_uString ** newStr, rtl_uString * str, rtl_uString const * from, - rtl_uString const * to, sal_Int32 * index) SAL_THROW_EXTERN_C() + rtl_uString const * to, sal_Int32 * index) noexcept { assert(from != nullptr); assert(to != nullptr); @@ -779,8 +767,7 @@ void rtl_uString_newReplaceFirst( void rtl_uString_newReplaceFirstAsciiL( rtl_uString ** newStr, rtl_uString * str, char const * from, - sal_Int32 fromLength, rtl_uString const * to, sal_Int32 * index) - SAL_THROW_EXTERN_C() + sal_Int32 fromLength, rtl_uString const * to, sal_Int32 * index) noexcept { assert(to != nullptr); rtl_uString_newReplaceFirstAsciiLUtf16L(newStr, str, from, fromLength, to->buffer, to->length, @@ -789,8 +776,7 @@ void rtl_uString_newReplaceFirstAsciiL( void rtl_uString_newReplaceFirstToAsciiL( rtl_uString ** newStr, rtl_uString * str, rtl_uString const * from, - char const * to, sal_Int32 toLength, sal_Int32 * index) - SAL_THROW_EXTERN_C() + char const * to, sal_Int32 toLength, sal_Int32 * index) noexcept { assert(from != nullptr); rtl_uString_newReplaceFirstUtf16LAsciiL(newStr, str, from->buffer, from->length, to, toLength, @@ -800,7 +786,7 @@ void rtl_uString_newReplaceFirstToAsciiL( void rtl_uString_newReplaceFirstAsciiLAsciiL( rtl_uString ** newStr, rtl_uString * str, char const * from, sal_Int32 fromLength, char const * to, sal_Int32 toLength, - sal_Int32 * index) SAL_THROW_EXTERN_C() + sal_Int32 * index) noexcept { assert(index != nullptr); rtl::str::newReplaceFirst(newStr, str, from, fromLength, to, toLength, *index); @@ -809,7 +795,7 @@ void rtl_uString_newReplaceFirstAsciiLAsciiL( void rtl_uString_newReplaceFirstAsciiLUtf16L( rtl_uString ** newStr, rtl_uString * str, char const * from, sal_Int32 fromLength, sal_Unicode const * to, sal_Int32 toLength, - sal_Int32 * index) SAL_THROW_EXTERN_C() + sal_Int32 * index) noexcept { assert(index != nullptr); rtl::str::newReplaceFirst(newStr, str, from, fromLength, to, toLength, *index); @@ -818,7 +804,7 @@ void rtl_uString_newReplaceFirstAsciiLUtf16L( void rtl_uString_newReplaceFirstUtf16LAsciiL( rtl_uString ** newStr, rtl_uString * str, sal_Unicode const * from, sal_Int32 fromLength, char const * to, sal_Int32 toLength, - sal_Int32 * index) SAL_THROW_EXTERN_C() + sal_Int32 * index) noexcept { assert(index != nullptr); rtl::str::newReplaceFirst(newStr, str, from, fromLength, to, toLength, *index); @@ -827,7 +813,7 @@ void rtl_uString_newReplaceFirstUtf16LAsciiL( void rtl_uString_newReplaceFirstUtf16LUtf16L( rtl_uString ** newStr, rtl_uString * str, sal_Unicode const * from, sal_Int32 fromLength, sal_Unicode const * to, sal_Int32 toLength, - sal_Int32 * index) SAL_THROW_EXTERN_C() + sal_Int32 * index) noexcept { assert(index != nullptr); rtl::str::newReplaceFirst(newStr, str, from, fromLength, to, toLength, *index); @@ -835,14 +821,14 @@ void rtl_uString_newReplaceFirstUtf16LUtf16L( void rtl_uString_newReplaceAll( rtl_uString ** newStr, rtl_uString * str, rtl_uString const * from, - rtl_uString const * to) SAL_THROW_EXTERN_C() + rtl_uString const * to) noexcept { rtl_uString_newReplaceAllFromIndex( newStr, str, from, to, 0 ); } void rtl_uString_newReplaceAllFromIndex( rtl_uString ** newStr, rtl_uString * str, rtl_uString const * from, - rtl_uString const * to, sal_Int32 fromIndex) SAL_THROW_EXTERN_C() + rtl_uString const * to, sal_Int32 fromIndex) noexcept { assert(to != nullptr); assert(fromIndex >= 0 && fromIndex <= str->length); @@ -852,7 +838,7 @@ void rtl_uString_newReplaceAllFromIndex( void rtl_uString_newReplaceAllAsciiL( rtl_uString ** newStr, rtl_uString * str, char const * from, - sal_Int32 fromLength, rtl_uString const * to) SAL_THROW_EXTERN_C() + sal_Int32 fromLength, rtl_uString const * to) noexcept { assert(to != nullptr); rtl_uString_newReplaceAllAsciiLUtf16L(newStr, str, from, fromLength, to->buffer, to->length); @@ -860,7 +846,7 @@ void rtl_uString_newReplaceAllAsciiL( void rtl_uString_newReplaceAllToAsciiL( rtl_uString ** newStr, rtl_uString * str, rtl_uString const * from, - char const * to, sal_Int32 toLength) SAL_THROW_EXTERN_C() + char const * to, sal_Int32 toLength) noexcept { assert(from != nullptr); rtl_uString_newReplaceAllUtf16LAsciiL(newStr, str, from->buffer, from->length, to, toLength); @@ -868,59 +854,52 @@ void rtl_uString_newReplaceAllToAsciiL( void rtl_uString_newReplaceAllAsciiLAsciiL( rtl_uString ** newStr, rtl_uString * str, char const * from, - sal_Int32 fromLength, char const * to, sal_Int32 toLength) - SAL_THROW_EXTERN_C() + sal_Int32 fromLength, char const * to, sal_Int32 toLength) noexcept { rtl::str::newReplaceAllFromIndex(newStr, str, from, fromLength, to, toLength, 0); } void rtl_uString_newReplaceAllAsciiLUtf16L( rtl_uString ** newStr, rtl_uString * str, char const * from, - sal_Int32 fromLength, sal_Unicode const * to, sal_Int32 toLength) - SAL_THROW_EXTERN_C() + sal_Int32 fromLength, sal_Unicode const * to, sal_Int32 toLength) noexcept { rtl::str::newReplaceAllFromIndex(newStr, str, from, fromLength, to, toLength, 0); } void rtl_uString_newReplaceAllUtf16LAsciiL( rtl_uString ** newStr, rtl_uString * str, sal_Unicode const * from, - sal_Int32 fromLength, char const * to, sal_Int32 toLength) - SAL_THROW_EXTERN_C() + sal_Int32 fromLength, char const * to, sal_Int32 toLength) noexcept { rtl::str::newReplaceAllFromIndex(newStr, str, from, fromLength, to, toLength, 0); } void rtl_uString_newReplaceAllUtf16LUtf16L( rtl_uString ** newStr, rtl_uString * str, sal_Unicode const * from, - sal_Int32 fromLength, sal_Unicode const * to, sal_Int32 toLength) - SAL_THROW_EXTERN_C() + sal_Int32 fromLength, sal_Unicode const * to, sal_Int32 toLength) noexcept { rtl_uString_newReplaceAllFromIndexUtf16LUtf16L(newStr, str, from, fromLength, to, toLength, 0); } void rtl_uString_newReplaceAllFromIndexUtf16LUtf16L( rtl_uString ** newStr, rtl_uString * str, sal_Unicode const * from, - sal_Int32 fromLength, sal_Unicode const * to, sal_Int32 toLength, sal_Int32 fromIndex) - SAL_THROW_EXTERN_C() + sal_Int32 fromLength, sal_Unicode const * to, sal_Int32 toLength, sal_Int32 fromIndex) noexcept { rtl::str::newReplaceAllFromIndex(newStr, str, from, fromLength, to, toLength, fromIndex); } -sal_Int32 SAL_CALL rtl_ustr_getLength(const sal_Unicode* pStr) SAL_THROW_EXTERN_C() +sal_Int32 SAL_CALL rtl_ustr_getLength(const sal_Unicode* pStr) noexcept { return rtl::str::getLength(pStr); } -sal_Int32 SAL_CALL rtl_ustr_compare(const sal_Unicode* pStr1, const sal_Unicode* pStr2) - SAL_THROW_EXTERN_C() +sal_Int32 SAL_CALL rtl_ustr_compare(const sal_Unicode* pStr1, const sal_Unicode* pStr2) noexcept { return rtl::str::compare(rtl::str::null_terminated(pStr1), rtl::str::null_terminated(pStr2), rtl::str::CompareNormal(), rtl::str::noShortening); } sal_Int32 SAL_CALL rtl_ustr_compare_WithLength(const sal_Unicode* pStr1, sal_Int32 nStr1Len, - const sal_Unicode* pStr2, sal_Int32 nStr2Len) - SAL_THROW_EXTERN_C() + const sal_Unicode* pStr2, sal_Int32 nStr2Len) noexcept { return rtl::str::compare(rtl::str::with_length(pStr1, nStr1Len), rtl::str::with_length(pStr2, nStr2Len), rtl::str::CompareNormal(), @@ -929,7 +908,7 @@ sal_Int32 SAL_CALL rtl_ustr_compare_WithLength(const sal_Unicode* pStr1, sal_Int sal_Int32 SAL_CALL rtl_ustr_shortenedCompare_WithLength( const sal_Unicode* pStr1, sal_Int32 nStr1Len, const sal_Unicode* pStr2, sal_Int32 nStr2Len, - sal_Int32 nShortenedLength) SAL_THROW_EXTERN_C() + sal_Int32 nShortenedLength) noexcept { return rtl::str::compare(rtl::str::with_length(pStr1, nStr1Len), rtl::str::with_length(pStr2, nStr2Len), rtl::str::CompareNormal(), @@ -937,15 +916,14 @@ sal_Int32 SAL_CALL rtl_ustr_shortenedCompare_WithLength( } sal_Int32 SAL_CALL rtl_ustr_reverseCompare_WithLength(const sal_Unicode* pStr1, sal_Int32 nStr1Len, - const sal_Unicode* pStr2, sal_Int32 nStr2Len) - SAL_THROW_EXTERN_C() + const sal_Unicode* pStr2, sal_Int32 nStr2Len) noexcept { return rtl::str::reverseCompare_WithLengths(pStr1, nStr1Len, pStr2, nStr2Len, rtl::str::CompareNormal()); } sal_Int32 SAL_CALL rtl_ustr_compareIgnoreAsciiCase(const sal_Unicode* pStr1, - const sal_Unicode* pStr2) SAL_THROW_EXTERN_C() + const sal_Unicode* pStr2) noexcept { return rtl::str::compare(rtl::str::null_terminated(pStr1), rtl::str::null_terminated(pStr2), rtl::str::CompareIgnoreAsciiCase(), rtl::str::noShortening); @@ -954,8 +932,7 @@ sal_Int32 SAL_CALL rtl_ustr_compareIgnoreAsciiCase(const sal_Unicode* pStr1, sal_Int32 SAL_CALL rtl_ustr_compareIgnoreAsciiCase_WithLength(const sal_Unicode* pStr1, sal_Int32 nStr1Len, const sal_Unicode* pStr2, - sal_Int32 nStr2Len) - SAL_THROW_EXTERN_C() + sal_Int32 nStr2Len) noexcept { return rtl::str::compare(rtl::str::with_length(pStr1, nStr1Len), rtl::str::with_length(pStr2, nStr2Len), @@ -964,174 +941,160 @@ sal_Int32 SAL_CALL rtl_ustr_compareIgnoreAsciiCase_WithLength(const sal_Unicode* sal_Int32 SAL_CALL rtl_ustr_shortenedCompareIgnoreAsciiCase_WithLength( const sal_Unicode* pStr1, sal_Int32 nStr1Len, const sal_Unicode* pStr2, sal_Int32 nStr2Len, - sal_Int32 nShortenedLength) SAL_THROW_EXTERN_C() + sal_Int32 nShortenedLength) noexcept { return rtl::str::compare(rtl::str::with_length(pStr1, nStr1Len), rtl::str::with_length(pStr2, nStr2Len), rtl::str::CompareIgnoreAsciiCase(), nShortenedLength); } -sal_Int32 SAL_CALL rtl_ustr_hashCode(const sal_Unicode* pStr) SAL_THROW_EXTERN_C() +sal_Int32 SAL_CALL rtl_ustr_hashCode(const sal_Unicode* pStr) noexcept { return rtl::str::hashCode(pStr); } -sal_Int32 SAL_CALL rtl_ustr_hashCode_WithLength(const sal_Unicode* pStr, sal_Int32 nLen) - SAL_THROW_EXTERN_C() +sal_Int32 SAL_CALL rtl_ustr_hashCode_WithLength(const sal_Unicode* pStr, sal_Int32 nLen) noexcept { return rtl::str::hashCode_WithLength(pStr, nLen); } -sal_Int32 SAL_CALL rtl_ustr_indexOfChar(const sal_Unicode* pStr, sal_Unicode c) SAL_THROW_EXTERN_C() +sal_Int32 SAL_CALL rtl_ustr_indexOfChar(const sal_Unicode* pStr, sal_Unicode c) noexcept { return rtl::str::indexOfChar(pStr, c); } sal_Int32 SAL_CALL rtl_ustr_indexOfChar_WithLength(const sal_Unicode* pStr, sal_Int32 nLen, - sal_Unicode c) SAL_THROW_EXTERN_C() + sal_Unicode c) noexcept { return rtl::str::indexOfChar_WithLength(pStr, nLen, c); } -sal_Int32 SAL_CALL rtl_ustr_lastIndexOfChar(const sal_Unicode* pStr, sal_Unicode c) - SAL_THROW_EXTERN_C() +sal_Int32 SAL_CALL rtl_ustr_lastIndexOfChar(const sal_Unicode* pStr, sal_Unicode c) noexcept { return rtl::str::lastIndexOfChar(pStr, c); } sal_Int32 SAL_CALL rtl_ustr_lastIndexOfChar_WithLength(const sal_Unicode* pStr, sal_Int32 nLen, - sal_Unicode c) SAL_THROW_EXTERN_C() + sal_Unicode c) noexcept { return rtl::str::lastIndexOfChar_WithLength(pStr, nLen, c); } -sal_Int32 SAL_CALL rtl_ustr_indexOfStr(const sal_Unicode* pStr, const sal_Unicode* pSubStr) - SAL_THROW_EXTERN_C() +sal_Int32 SAL_CALL rtl_ustr_indexOfStr(const sal_Unicode* pStr, const sal_Unicode* pSubStr) noexcept { return rtl::str::indexOfStr(pStr, pSubStr); } sal_Int32 SAL_CALL rtl_ustr_indexOfStr_WithLength(const sal_Unicode* pStr, sal_Int32 nStrLen, - const sal_Unicode* pSubStr, sal_Int32 nSubLen) - SAL_THROW_EXTERN_C() + const sal_Unicode* pSubStr, sal_Int32 nSubLen) noexcept { return rtl::str::indexOfStr_WithLength(pStr, nStrLen, pSubStr, nSubLen); } -sal_Int32 SAL_CALL rtl_ustr_lastIndexOfStr(const sal_Unicode* pStr, const sal_Unicode* pSubStr) - SAL_THROW_EXTERN_C() +sal_Int32 SAL_CALL rtl_ustr_lastIndexOfStr(const sal_Unicode* pStr, const sal_Unicode* pSubStr) noexcept { return rtl::str::lastIndexOfStr(pStr, pSubStr); } sal_Int32 SAL_CALL rtl_ustr_lastIndexOfStr_WithLength(const sal_Unicode* pStr, sal_Int32 nStrLen, - const sal_Unicode* pSubStr, sal_Int32 nSubLen) - SAL_THROW_EXTERN_C() + const sal_Unicode* pSubStr, sal_Int32 nSubLen) noexcept { return rtl::str::lastIndexOfStr_WithLength(pStr, nStrLen, pSubStr, nSubLen); } -void SAL_CALL rtl_ustr_replaceChar(sal_Unicode* pStr, sal_Unicode cOld, sal_Unicode cNew) - SAL_THROW_EXTERN_C() +void SAL_CALL rtl_ustr_replaceChar(sal_Unicode* pStr, sal_Unicode cOld, sal_Unicode cNew) noexcept { return rtl::str::replaceChars(rtl::str::null_terminated(pStr), rtl::str::FromTo(cOld, cNew)); } void SAL_CALL rtl_ustr_replaceChar_WithLength(sal_Unicode* pStr, sal_Int32 nLen, sal_Unicode cOld, - sal_Unicode cNew) SAL_THROW_EXTERN_C() + sal_Unicode cNew) noexcept { return rtl::str::replaceChars(rtl::str::with_length(pStr, nLen), rtl::str::FromTo(cOld, cNew)); } -void SAL_CALL rtl_ustr_toAsciiLowerCase(sal_Unicode* pStr) SAL_THROW_EXTERN_C() +void SAL_CALL rtl_ustr_toAsciiLowerCase(sal_Unicode* pStr) noexcept { return rtl::str::replaceChars(rtl::str::null_terminated(pStr), rtl::str::toAsciiLower); } -void SAL_CALL rtl_ustr_toAsciiLowerCase_WithLength(sal_Unicode* pStr, sal_Int32 nLen) - SAL_THROW_EXTERN_C() +void SAL_CALL rtl_ustr_toAsciiLowerCase_WithLength(sal_Unicode* pStr, sal_Int32 nLen) noexcept { return rtl::str::replaceChars(rtl::str::with_length(pStr, nLen), rtl::str::toAsciiLower); } -void SAL_CALL rtl_ustr_toAsciiUpperCase(sal_Unicode* pStr) SAL_THROW_EXTERN_C() +void SAL_CALL rtl_ustr_toAsciiUpperCase(sal_Unicode* pStr) noexcept { return rtl::str::replaceChars(rtl::str::null_terminated(pStr), rtl::str::toAsciiUpper); } -void SAL_CALL rtl_ustr_toAsciiUpperCase_WithLength(sal_Unicode* pStr, sal_Int32 nLen) - SAL_THROW_EXTERN_C() +void SAL_CALL rtl_ustr_toAsciiUpperCase_WithLength(sal_Unicode* pStr, sal_Int32 nLen) noexcept { return rtl::str::replaceChars(rtl::str::with_length(pStr, nLen), rtl::str::toAsciiUpper); } -sal_Int32 SAL_CALL rtl_ustr_trim(sal_Unicode* pStr) SAL_THROW_EXTERN_C() +sal_Int32 SAL_CALL rtl_ustr_trim(sal_Unicode* pStr) noexcept { return rtl::str::trim(pStr); } -sal_Int32 SAL_CALL rtl_ustr_trim_WithLength(sal_Unicode* pStr, sal_Int32 nLen) SAL_THROW_EXTERN_C() +sal_Int32 SAL_CALL rtl_ustr_trim_WithLength(sal_Unicode* pStr, sal_Int32 nLen) noexcept { return rtl::str::trim_WithLength(pStr, nLen); } -sal_Int32 SAL_CALL rtl_ustr_valueOfBoolean(sal_Unicode* pStr, sal_Bool b) SAL_THROW_EXTERN_C() +sal_Int32 SAL_CALL rtl_ustr_valueOfBoolean(sal_Unicode* pStr, sal_Bool b) noexcept { return rtl::str::valueOfBoolean(pStr, b); } -sal_Int32 SAL_CALL rtl_ustr_valueOfChar(sal_Unicode* pStr, sal_Unicode c) SAL_THROW_EXTERN_C() +sal_Int32 SAL_CALL rtl_ustr_valueOfChar(sal_Unicode* pStr, sal_Unicode c) noexcept { return rtl::str::valueOfChar(pStr, c); } -sal_Int32 SAL_CALL rtl_ustr_valueOfInt32(sal_Unicode* pStr, sal_Int32 n, sal_Int16 nRadix) - SAL_THROW_EXTERN_C() +sal_Int32 SAL_CALL rtl_ustr_valueOfInt32(sal_Unicode* pStr, sal_Int32 n, sal_Int16 nRadix) noexcept { return rtl::str::valueOfInt<RTL_USTR_MAX_VALUEOFINT32>(pStr, n, nRadix); } -sal_Int32 SAL_CALL rtl_ustr_valueOfInt64(sal_Unicode* pStr, sal_Int64 n, sal_Int16 nRadix) - SAL_THROW_EXTERN_C() +sal_Int32 SAL_CALL rtl_ustr_valueOfInt64(sal_Unicode* pStr, sal_Int64 n, sal_Int16 nRadix) noexcept { return rtl::str::valueOfInt<RTL_USTR_MAX_VALUEOFINT64>(pStr, n, nRadix); } -sal_Int32 SAL_CALL rtl_ustr_valueOfUInt64(sal_Unicode* pStr, sal_uInt64 n, sal_Int16 nRadix) - SAL_THROW_EXTERN_C() +sal_Int32 SAL_CALL rtl_ustr_valueOfUInt64(sal_Unicode* pStr, sal_uInt64 n, sal_Int16 nRadix) noexcept { return rtl::str::valueOfInt<RTL_USTR_MAX_VALUEOFUINT64>(pStr, n, nRadix); } -sal_Bool SAL_CALL rtl_ustr_toBoolean(const sal_Unicode* pStr) SAL_THROW_EXTERN_C() +sal_Bool SAL_CALL rtl_ustr_toBoolean(const sal_Unicode* pStr) noexcept { return rtl::str::toBoolean(pStr); } -sal_Int32 SAL_CALL rtl_ustr_toInt32(const sal_Unicode* pStr, sal_Int16 nRadix) SAL_THROW_EXTERN_C() +sal_Int32 SAL_CALL rtl_ustr_toInt32(const sal_Unicode* pStr, sal_Int16 nRadix) noexcept { return rtl::str::toInt<sal_Int32>(rtl::str::null_terminated(pStr), nRadix); } -sal_Int64 SAL_CALL rtl_ustr_toInt64(const sal_Unicode* pStr, sal_Int16 nRadix) SAL_THROW_EXTERN_C() +sal_Int64 SAL_CALL rtl_ustr_toInt64(const sal_Unicode* pStr, sal_Int16 nRadix) noexcept { return rtl::str::toInt<sal_Int64>(rtl::str::null_terminated(pStr), nRadix); } sal_Int64 SAL_CALL rtl_ustr_toInt64_WithLength(const sal_Unicode* pStr, sal_Int16 nRadix, - sal_Int32 nStrLength) SAL_THROW_EXTERN_C() + sal_Int32 nStrLength) noexcept { return rtl::str::toInt<sal_Int64>(rtl::str::with_length(pStr, nStrLength), nRadix); } -sal_uInt32 SAL_CALL rtl_ustr_toUInt32(const sal_Unicode* pStr, sal_Int16 nRadix) - SAL_THROW_EXTERN_C() +sal_uInt32 SAL_CALL rtl_ustr_toUInt32(const sal_Unicode* pStr, sal_Int16 nRadix) noexcept { return rtl::str::toInt<sal_uInt32>(rtl::str::null_terminated(pStr), nRadix); } -sal_uInt64 SAL_CALL rtl_ustr_toUInt64(const sal_Unicode* pStr, sal_Int16 nRadix) - SAL_THROW_EXTERN_C() +sal_uInt64 SAL_CALL rtl_ustr_toUInt64(const sal_Unicode* pStr, sal_Int16 nRadix) noexcept { return rtl::str::toInt<sal_uInt64>(rtl::str::null_terminated(pStr), nRadix); } @@ -1141,129 +1104,121 @@ rtl_uString* rtl_uString_ImplAlloc(sal_Int32 nLen) return rtl::str::Alloc<rtl_uString>(nLen); } -void SAL_CALL rtl_uString_acquire(rtl_uString* pThis) SAL_THROW_EXTERN_C() +void SAL_CALL rtl_uString_acquire(rtl_uString* pThis) noexcept { return rtl::str::acquire(pThis); } -void SAL_CALL rtl_uString_release(rtl_uString* pThis) SAL_THROW_EXTERN_C() +void SAL_CALL rtl_uString_release(rtl_uString* pThis) noexcept { return rtl::str::release(pThis); } -void SAL_CALL rtl_uString_new(rtl_uString** ppThis) SAL_THROW_EXTERN_C() +void SAL_CALL rtl_uString_new(rtl_uString** ppThis) noexcept { return rtl::str::new_(ppThis); } -rtl_uString* SAL_CALL rtl_uString_alloc(sal_Int32 nLen) SAL_THROW_EXTERN_C() +rtl_uString* SAL_CALL rtl_uString_alloc(sal_Int32 nLen) noexcept { assert(nLen >= 0); return rtl::str::Alloc<rtl_uString>(nLen); } -void SAL_CALL rtl_uString_new_WithLength(rtl_uString** ppThis, sal_Int32 nLen) SAL_THROW_EXTERN_C() +void SAL_CALL rtl_uString_new_WithLength(rtl_uString** ppThis, sal_Int32 nLen) noexcept { rtl::str::new_WithLength(ppThis, nLen); } -void SAL_CALL rtl_uString_newFromString(rtl_uString** ppThis, const rtl_uString* pStr) - SAL_THROW_EXTERN_C() +void SAL_CALL rtl_uString_newFromString(rtl_uString** ppThis, const rtl_uString* pStr) noexcept { rtl::str::newFromString(ppThis, pStr); } -void SAL_CALL rtl_uString_newFromStr(rtl_uString** ppThis, const sal_Unicode* pCharStr) - SAL_THROW_EXTERN_C() +void SAL_CALL rtl_uString_newFromStr(rtl_uString** ppThis, const sal_Unicode* pCharStr) noexcept { rtl::str::newFromStr(ppThis, pCharStr); } void SAL_CALL rtl_uString_newFromStr_WithLength(rtl_uString** ppThis, const sal_Unicode* pCharStr, - sal_Int32 nLen) SAL_THROW_EXTERN_C() + sal_Int32 nLen) noexcept { rtl::str::newFromStr_WithLength(ppThis, pCharStr, nLen); } void SAL_CALL rtl_uString_newFromSubString(rtl_uString** ppThis, const rtl_uString* pFrom, - sal_Int32 beginIndex, sal_Int32 count) - SAL_THROW_EXTERN_C() + sal_Int32 beginIndex, sal_Int32 count) noexcept { rtl::str::newFromSubString(ppThis, pFrom, beginIndex, count); } // Used when creating from string literals. void SAL_CALL rtl_uString_newFromLiteral(rtl_uString** ppThis, const char* pCharStr, sal_Int32 nLen, - sal_Int32 allocExtra) SAL_THROW_EXTERN_C() + sal_Int32 allocExtra) noexcept { rtl::str::newFromStr_WithLength(ppThis, pCharStr, nLen, allocExtra); } -void SAL_CALL rtl_uString_assign(rtl_uString** ppThis, rtl_uString* pStr) SAL_THROW_EXTERN_C() +void SAL_CALL rtl_uString_assign(rtl_uString** ppThis, rtl_uString* pStr) noexcept { rtl::str::assign(ppThis, pStr); } -sal_Int32 SAL_CALL rtl_uString_getLength(const rtl_uString* pThis) SAL_THROW_EXTERN_C() +sal_Int32 SAL_CALL rtl_uString_getLength(const rtl_uString* pThis) noexcept { return rtl::str::getLength(pThis); } -sal_Unicode* SAL_CALL rtl_uString_getStr(rtl_uString* pThis) SAL_THROW_EXTERN_C() +sal_Unicode* SAL_CALL rtl_uString_getStr(rtl_uString* pThis) noexcept { return rtl::str::getStr(pThis); } -void SAL_CALL rtl_uString_newConcat(rtl_uString** ppThis, rtl_uString* pLeft, rtl_uString* pRight) - SAL_THROW_EXTERN_C() +void SAL_CALL rtl_uString_newConcat(rtl_uString** ppThis, rtl_uString* pLeft, rtl_uString* pRight) noexcept { rtl::str::newConcat(ppThis, pLeft, pRight); } -void SAL_CALL rtl_uString_ensureCapacity(rtl_uString** ppThis, sal_Int32 size) SAL_THROW_EXTERN_C() +void SAL_CALL rtl_uString_ensureCapacity(rtl_uString** ppThis, sal_Int32 size) noexcept { rtl::str::ensureCapacity(ppThis, size); } void SAL_CALL rtl_uString_newReplaceStrAt(rtl_uString** ppThis, rtl_uString* pStr, sal_Int32 nIndex, - sal_Int32 nCount, rtl_uString* pNewSubStr) - SAL_THROW_EXTERN_C() + sal_Int32 nCount, rtl_uString* pNewSubStr) noexcept { rtl::str::newReplaceStrAt(ppThis, pStr, nIndex, nCount, pNewSubStr); } void SAL_CALL rtl_uString_newReplaceStrAtUtf16L(rtl_uString** ppThis, rtl_uString* pStr, sal_Int32 nIndex, - sal_Int32 nCount, sal_Unicode const * subStr, sal_Int32 substrLen) - SAL_THROW_EXTERN_C() + sal_Int32 nCount, sal_Unicode const * subStr, sal_Int32 substrLen) noexcept { rtl::str::newReplaceStrAt(ppThis, pStr, nIndex, nCount, subStr, substrLen); } void SAL_CALL rtl_uString_newReplace(rtl_uString** ppThis, rtl_uString* pStr, sal_Unicode cOld, - sal_Unicode cNew) SAL_THROW_EXTERN_C() + sal_Unicode cNew) noexcept { rtl::str::newReplaceChars(ppThis, pStr, rtl::str::FromTo(cOld, cNew)); } -void SAL_CALL rtl_uString_newToAsciiLowerCase(rtl_uString** ppThis, rtl_uString* pStr) - SAL_THROW_EXTERN_C() +void SAL_CALL rtl_uString_newToAsciiLowerCase(rtl_uString** ppThis, rtl_uString* pStr) noexcept { rtl::str::newReplaceChars(ppThis, pStr, rtl::str::toAsciiLower); } -void SAL_CALL rtl_uString_newToAsciiUpperCase(rtl_uString** ppThis, rtl_uString* pStr) - SAL_THROW_EXTERN_C() +void SAL_CALL rtl_uString_newToAsciiUpperCase(rtl_uString** ppThis, rtl_uString* pStr) noexcept { rtl::str::newReplaceChars(ppThis, pStr, rtl::str::toAsciiUpper); } -void SAL_CALL rtl_uString_newTrim(rtl_uString** ppThis, rtl_uString* pStr) SAL_THROW_EXTERN_C() +void SAL_CALL rtl_uString_newTrim(rtl_uString** ppThis, rtl_uString* pStr) noexcept { rtl::str::newTrim(ppThis, pStr); } sal_Int32 SAL_CALL rtl_uString_getToken(rtl_uString** ppThis, rtl_uString* pStr, sal_Int32 nToken, - sal_Unicode cTok, sal_Int32 nIndex) SAL_THROW_EXTERN_C() + sal_Unicode cTok, sal_Int32 nIndex) noexcept { return rtl::str::getToken(ppThis, pStr, nToken, cTok, nIndex); } |