1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include <sal/config.h>
25 #include <osl/interlck.h>
26 #include <osl/diagnose.h>
27 #include <rtl/tencinfo.h>
30 #include <rtl/character.hxx>
31 #include <rtl/string.h>
36 // Temporary check to verify that the #pragma pack around rtl_String is indeed cargo cult and can
38 static_assert(alignof (rtl_String
) == 4);
39 static_assert(sizeof (rtl_String
) == 12);
42 /* ======================================================================= */
45 #define RTL_LOG_STRING_BITS 8
48 #include "strtmpl.hxx"
50 /* static data to be referenced by all empty strings
51 * the refCount is predefined to 1 and must never become 0 !
54 rtl_String
rtl::str::EmptyStringImpl
<rtl_String
>::data
=
56 SAL_STRING_STATIC_FLAG
|1,
57 /* sal_Int32 refCount; */
58 0, /* sal_Int32 length; */
59 { 0 } /* char buffer[1]; */
62 /* ======================================================================= */
64 sal_Int32 SAL_CALL
rtl_str_valueOfFloat(char * pStr
, float f
)
68 rtl_String
* pResult
= nullptr;
70 rtl_math_doubleToString(
71 &pResult
, nullptr, 0, f
, rtl_math_StringFormat_G
,
72 RTL_STR_MAX_VALUEOFFLOAT
- RTL_CONSTASCII_LENGTH("-x.E-xxx"), '.', nullptr, 0,
74 nLen
= pResult
->length
;
75 OSL_ASSERT(nLen
< RTL_STR_MAX_VALUEOFFLOAT
);
76 memcpy(pStr
, pResult
->buffer
, (nLen
+ 1) * sizeof(char));
77 rtl_string_release(pResult
);
81 sal_Int32 SAL_CALL
rtl_str_valueOfDouble(char * pStr
, double d
)
85 rtl_String
* pResult
= nullptr;
87 rtl_math_doubleToString(
88 &pResult
, nullptr, 0, d
, rtl_math_StringFormat_G
,
89 RTL_STR_MAX_VALUEOFDOUBLE
- RTL_CONSTASCII_LENGTH("-x.E-xxx"), '.', nullptr,
91 nLen
= pResult
->length
;
92 OSL_ASSERT(nLen
< RTL_STR_MAX_VALUEOFDOUBLE
);
93 memcpy(pStr
, pResult
->buffer
, (nLen
+ 1) * sizeof(char));
94 rtl_string_release(pResult
);
98 float SAL_CALL
rtl_str_toFloat(char const * pStr
) SAL_THROW_EXTERN_C()
101 return static_cast<float>(rtl_math_stringToDouble(pStr
, pStr
+ rtl_str_getLength(pStr
),
102 '.', 0, nullptr, nullptr));
105 double SAL_CALL
rtl_str_toDouble(char const * pStr
) SAL_THROW_EXTERN_C()
108 return rtl_math_stringToDouble(pStr
, pStr
+ rtl_str_getLength(pStr
), '.', 0,
112 /* ======================================================================= */
114 static int rtl_ImplGetFastUTF8ByteLen( const sal_Unicode
* pStr
, sal_Int32 nLen
)
118 sal_uInt32 nUCS4Char
;
119 const sal_Unicode
* pEndStr
;
123 while ( pStr
< pEndStr
)
129 else if ( c
< 0x800 )
133 if ( !rtl::isHighSurrogate(c
) )
139 if ( pStr
+1 < pEndStr
)
142 if ( rtl::isLowSurrogate(c
) )
144 nUCS4Char
= rtl::combineSurrogates(nUCS4Char
, c
);
149 if ( nUCS4Char
< 0x10000 )
151 else if ( nUCS4Char
< 0x200000 )
153 else if ( nUCS4Char
< 0x4000000 )
166 /* ----------------------------------------------------------------------- */
168 static bool rtl_impl_convertUStringToString(rtl_String
** pTarget
,
169 sal_Unicode
const * pSource
,
171 rtl_TextEncoding nEncoding
,
175 assert(pTarget
!= nullptr);
176 assert(pSource
!= nullptr || nLength
== 0);
177 assert(nLength
>= 0);
178 OSL_ASSERT(nLength
== 0 || rtl_isOctetTextEncoding(nEncoding
));
181 rtl_string_new( pTarget
);
185 rtl_UnicodeToTextConverter hConverter
;
190 sal_Size nNotConvertedChars
;
191 sal_Size nMaxCharLen
;
193 /* Optimization for UTF-8 - we try to calculate the exact length */
194 /* For all other encoding we try a good estimation */
195 if ( nEncoding
== RTL_TEXTENCODING_UTF8
)
197 nNewLen
= rtl_ImplGetFastUTF8ByteLen( pSource
, nLength
);
198 /* Includes the string only ASCII, then we could copy
200 if ( nNewLen
== static_cast<sal_Size
>(nLength
) )
204 rtl_string_release( *pTarget
);
205 *pTarget
= rtl_string_ImplAlloc( nLength
);
206 OSL_ASSERT(*pTarget
!= nullptr);
207 pBuffer
= (*pTarget
)->buffer
;
210 /* Check ASCII range */
211 OSL_ENSURE( *pSource
<= 127,
212 "rtl_uString2String() - UTF8 test is encoding is wrong" );
214 *pBuffer
= static_cast<char>(static_cast<unsigned char>(*pSource
));
227 rtl_TextEncodingInfo aTextEncInfo
;
228 aTextEncInfo
.StructSize
= sizeof( aTextEncInfo
);
229 if ( !rtl_getTextEncodingInfo( nEncoding
, &aTextEncInfo
) )
231 aTextEncInfo
.AverageCharSize
= 1;
232 aTextEncInfo
.MaximumCharSize
= 8;
235 nNewLen
= nLength
* static_cast<sal_Size
>(aTextEncInfo
.AverageCharSize
);
236 nMaxCharLen
= aTextEncInfo
.MaximumCharSize
;
239 nFlags
|= RTL_UNICODETOTEXT_FLAGS_FLUSH
;
240 hConverter
= rtl_createUnicodeToTextConverter( nEncoding
);
244 pTemp
= rtl_string_ImplAlloc( nNewLen
);
245 OSL_ASSERT(pTemp
!= nullptr);
246 nDestBytes
= rtl_convertUnicodeToText( hConverter
, nullptr,
248 pTemp
->buffer
, nNewLen
,
250 &nInfo
, &nSrcChars
);
251 if (bCheckErrors
&& (nInfo
& RTL_UNICODETOTEXT_INFO_ERROR
) != 0)
253 rtl_freeString(pTemp
);
254 rtl_destroyUnicodeToTextConverter(hConverter
);
258 if ((nInfo
& RTL_UNICODETOTEXT_INFO_DESTBUFFERTOSMALL
) == 0)
261 /* Buffer not big enough, try again with enough space */
262 rtl_freeString( pTemp
);
264 /* Try with the max. count of characters with
265 additional overhead for replacing functionality */
266 nNotConvertedChars
= nLength
-nSrcChars
;
267 nNewLen
= nDestBytes
+(nNotConvertedChars
*nMaxCharLen
)+nNotConvertedChars
+4;
270 /* Set the buffer to the correct size or is there to
271 much overhead, reallocate to the correct size */
272 if ( nNewLen
> nDestBytes
+8 )
274 rtl_String
* pTemp2
= rtl_string_ImplAlloc( nDestBytes
);
275 OSL_ASSERT(pTemp2
!= nullptr);
276 rtl::str::Copy(pTemp2
->buffer
, pTemp
->buffer
, nDestBytes
);
277 rtl_freeString( pTemp
);
282 pTemp
->length
= nDestBytes
;
283 pTemp
->buffer
[nDestBytes
] = 0;
286 rtl_destroyUnicodeToTextConverter( hConverter
);
288 rtl_string_release( *pTarget
);
291 /* Results the conversion in an empty buffer -
292 create an empty string */
293 if ( pTemp
&& !nDestBytes
)
294 rtl_string_new( pTarget
);
299 void SAL_CALL
rtl_uString2String( rtl_String
** ppThis
,
300 const sal_Unicode
* pUStr
,
302 rtl_TextEncoding eTextEncoding
,
303 sal_uInt32 nCvtFlags
)
306 rtl_impl_convertUStringToString(ppThis
, pUStr
, nULen
, eTextEncoding
,
310 sal_Bool SAL_CALL
rtl_convertUStringToString(rtl_String
** pTarget
,
311 sal_Unicode
const * pSource
,
313 rtl_TextEncoding nEncoding
,
317 return rtl_impl_convertUStringToString(pTarget
, pSource
, nLength
, nEncoding
,
321 void rtl_string_newReplaceFirst(
322 rtl_String
** newStr
, rtl_String
* str
, char const * from
,
323 sal_Int32 fromLength
, char const * to
, sal_Int32 toLength
,
324 sal_Int32
* index
) SAL_THROW_EXTERN_C()
326 assert(str
!= nullptr);
327 assert(index
!= nullptr);
328 assert(*index
>= 0 && *index
<= str
->length
);
329 assert(fromLength
>= 0);
330 assert(toLength
>= 0);
331 sal_Int32 i
= rtl_str_indexOfStr_WithLength(
332 str
->buffer
+ *index
, str
->length
- *index
, from
, fromLength
);
334 rtl_string_assign(newStr
, str
);
336 assert(i
<= str
->length
- *index
);
338 assert(fromLength
<= str
->length
);
339 if (str
->length
- fromLength
> SAL_MAX_INT32
- toLength
) {
342 sal_Int32 n
= str
->length
- fromLength
+ toLength
;
343 rtl_string_acquire(str
); // in case *newStr == str
344 rtl_string_new_WithLength(newStr
, n
);
346 (*newStr
)->length
= n
;
347 assert(i
>= 0 && i
< str
->length
);
348 memcpy((*newStr
)->buffer
, str
->buffer
, i
);
349 memcpy((*newStr
)->buffer
+ i
, to
, toLength
);
351 (*newStr
)->buffer
+ i
+ toLength
, str
->buffer
+ i
+ fromLength
,
352 str
->length
- i
- fromLength
);
354 rtl_string_release(str
);
359 void rtl_string_newReplaceAll(
360 rtl_String
** newStr
, rtl_String
* str
, char const * from
,
361 sal_Int32 fromLength
, char const * to
, sal_Int32 toLength
)
364 rtl_string_assign(newStr
, str
);
365 for (sal_Int32 i
= 0;; i
+= toLength
) {
366 rtl_string_newReplaceFirst(
367 newStr
, *newStr
, from
, fromLength
, to
, toLength
, &i
);
374 sal_Int32 SAL_CALL
rtl_str_getLength(const char* pStr
) SAL_THROW_EXTERN_C()
376 return rtl::str::getLength(pStr
);
379 sal_Int32 SAL_CALL
rtl_str_compare(const char* pStr1
, const char* pStr2
) SAL_THROW_EXTERN_C()
381 return rtl::str::compare(pStr1
, pStr2
);
384 sal_Int32 SAL_CALL
rtl_str_compare_WithLength(const char* pStr1
, sal_Int32 nStr1Len
,
385 const char* pStr2
, sal_Int32 nStr2Len
)
388 return rtl::str::compare_WithLength(pStr1
, nStr1Len
, pStr2
, nStr2Len
);
391 sal_Int32 SAL_CALL
rtl_str_shortenedCompare_WithLength(const char* pStr1
, sal_Int32 nStr1Len
,
392 const char* pStr2
, sal_Int32 nStr2Len
,
393 sal_Int32 nShortenedLength
)
396 return rtl::str::shortenedCompare_WithLength(pStr1
, nStr1Len
, pStr2
, nStr2Len
, nShortenedLength
);
399 sal_Int32 SAL_CALL
rtl_str_reverseCompare_WithLength(const char* pStr1
, sal_Int32 nStr1Len
,
400 const char* pStr2
, sal_Int32 nStr2Len
)
403 return rtl::str::reverseCompare_WithLength(pStr1
, nStr1Len
, pStr2
, nStr2Len
);
406 sal_Int32 SAL_CALL
rtl_str_compareIgnoreAsciiCase(const char* pStr1
, const char* pStr2
)
409 return rtl::str::compareIgnoreAsciiCase(pStr1
, pStr2
);
412 sal_Int32 SAL_CALL
rtl_str_compareIgnoreAsciiCase_WithLength(const char* pStr1
, sal_Int32 nStr1Len
,
413 const char* pStr2
, sal_Int32 nStr2Len
)
416 return rtl::str::compareIgnoreAsciiCase_WithLength(pStr1
, nStr1Len
, pStr2
, nStr2Len
);
419 sal_Int32 SAL_CALL
rtl_str_shortenedCompareIgnoreAsciiCase_WithLength(
420 const char* pStr1
, sal_Int32 nStr1Len
, const char* pStr2
, sal_Int32 nStr2Len
,
421 sal_Int32 nShortenedLength
) SAL_THROW_EXTERN_C()
423 return rtl::str::shortenedCompareIgnoreAsciiCase_WithLength(pStr1
, nStr1Len
, pStr2
, nStr2Len
,
427 sal_Int32 SAL_CALL
rtl_str_hashCode(const char* pStr
) SAL_THROW_EXTERN_C()
429 return rtl::str::hashCode(pStr
);
432 sal_Int32 SAL_CALL
rtl_str_hashCode_WithLength(const char* pStr
, sal_Int32 nLen
)
435 return rtl::str::hashCode_WithLength(pStr
, nLen
);
438 sal_Int32 SAL_CALL
rtl_str_indexOfChar(const char* pStr
, char c
) SAL_THROW_EXTERN_C()
440 return rtl::str::indexOfChar(pStr
, c
);
443 sal_Int32 SAL_CALL
rtl_str_indexOfChar_WithLength(const char* pStr
, sal_Int32 nLen
, char c
)
446 return rtl::str::indexOfChar_WithLength(pStr
, nLen
, c
);
449 sal_Int32 SAL_CALL
rtl_str_lastIndexOfChar(const char* pStr
, char c
) SAL_THROW_EXTERN_C()
451 return rtl::str::lastIndexOfChar(pStr
, c
);
454 sal_Int32 SAL_CALL
rtl_str_lastIndexOfChar_WithLength(const char* pStr
, sal_Int32 nLen
, char c
)
457 return rtl::str::lastIndexOfChar_WithLength(pStr
, nLen
, c
);
460 sal_Int32 SAL_CALL
rtl_str_indexOfStr(const char* pStr
, const char* pSubStr
) SAL_THROW_EXTERN_C()
462 return rtl::str::indexOfStr(pStr
, pSubStr
);
465 sal_Int32 SAL_CALL
rtl_str_indexOfStr_WithLength(const char* pStr
, sal_Int32 nStrLen
,
466 const char* pSubStr
, sal_Int32 nSubLen
)
469 return rtl::str::indexOfStr_WithLength(pStr
, nStrLen
, pSubStr
, nSubLen
);
472 sal_Int32 SAL_CALL
rtl_str_lastIndexOfStr(const char* pStr
, const char* pSubStr
)
475 return rtl::str::lastIndexOfStr(pStr
, pSubStr
);
478 sal_Int32 SAL_CALL
rtl_str_lastIndexOfStr_WithLength(const char* pStr
, sal_Int32 nStrLen
,
479 const char* pSubStr
, sal_Int32 nSubLen
)
482 return rtl::str::lastIndexOfStr_WithLength(pStr
, nStrLen
, pSubStr
, nSubLen
);
485 void SAL_CALL
rtl_str_replaceChar(char* pStr
, char cOld
, char cNew
) SAL_THROW_EXTERN_C()
487 return rtl::str::replaceChar(pStr
, cOld
, cNew
);
490 void SAL_CALL
rtl_str_replaceChar_WithLength(char* pStr
, sal_Int32 nLen
, char cOld
, char cNew
)
493 return rtl::str::replaceChar_WithLength(pStr
, nLen
, cOld
, cNew
);
496 void SAL_CALL
rtl_str_toAsciiLowerCase(char* pStr
) SAL_THROW_EXTERN_C()
498 return rtl::str::toAsciiLowerCase(pStr
);
501 void SAL_CALL
rtl_str_toAsciiLowerCase_WithLength(char* pStr
, sal_Int32 nLen
) SAL_THROW_EXTERN_C()
503 return rtl::str::toAsciiLowerCase_WithLength(pStr
, nLen
);
506 void SAL_CALL
rtl_str_toAsciiUpperCase(char* pStr
) SAL_THROW_EXTERN_C()
508 return rtl::str::toAsciiUpperCase(pStr
);
511 void SAL_CALL
rtl_str_toAsciiUpperCase_WithLength(char* pStr
, sal_Int32 nLen
) SAL_THROW_EXTERN_C()
513 return rtl::str::toAsciiUpperCase_WithLength(pStr
, nLen
);
516 sal_Int32 SAL_CALL
rtl_str_trim(char* pStr
) SAL_THROW_EXTERN_C() { return rtl::str::trim(pStr
); }
518 sal_Int32 SAL_CALL
rtl_str_trim_WithLength(char* pStr
, sal_Int32 nLen
) SAL_THROW_EXTERN_C()
520 return rtl::str::trim_WithLength(pStr
, nLen
);
523 sal_Int32 SAL_CALL
rtl_str_valueOfBoolean(char* pStr
, sal_Bool b
) SAL_THROW_EXTERN_C()
525 return rtl::str::valueOfBoolean(pStr
, b
);
528 sal_Int32 SAL_CALL
rtl_str_valueOfChar(char* pStr
, char c
) SAL_THROW_EXTERN_C()
530 return rtl::str::valueOfChar(pStr
, c
);
533 sal_Int32 SAL_CALL
rtl_str_valueOfInt32(char* pStr
, sal_Int32 n
, sal_Int16 nRadix
)
536 return rtl::str::valueOfInt32(pStr
, n
, nRadix
);
539 sal_Int32 SAL_CALL
rtl_str_valueOfInt64(char* pStr
, sal_Int64 n
, sal_Int16 nRadix
)
542 return rtl::str::valueOfInt64(pStr
, n
, nRadix
);
545 sal_Int32 SAL_CALL
rtl_str_valueOfUInt64(char* pStr
, sal_uInt64 n
, sal_Int16 nRadix
)
548 return rtl::str::valueOfUInt64(pStr
, n
, nRadix
);
551 sal_Bool SAL_CALL
rtl_str_toBoolean(const char* pStr
) SAL_THROW_EXTERN_C()
553 return rtl::str::toBoolean(pStr
);
556 sal_Int32 SAL_CALL
rtl_str_toInt32(const char* pStr
, sal_Int16 nRadix
) SAL_THROW_EXTERN_C()
558 return rtl::str::toInt32(pStr
, nRadix
);
561 sal_Int64 SAL_CALL
rtl_str_toInt64(const char* pStr
, sal_Int16 nRadix
) SAL_THROW_EXTERN_C()
563 return rtl::str::toInt64(pStr
, nRadix
);
566 sal_Int64 SAL_CALL
rtl_str_toInt64_WithLength(const char* pStr
, sal_Int16 nRadix
,
567 sal_Int32 nStrLength
) SAL_THROW_EXTERN_C()
569 return rtl::str::toInt64_WithLength(pStr
, nRadix
, nStrLength
);
572 sal_uInt32 SAL_CALL
rtl_str_toUInt32(const char* pStr
, sal_Int16 nRadix
) SAL_THROW_EXTERN_C()
574 return rtl::str::toUInt32(pStr
, nRadix
);
577 sal_uInt64 SAL_CALL
rtl_str_toUInt64(const char* pStr
, sal_Int16 nRadix
) SAL_THROW_EXTERN_C()
579 return rtl::str::toUInt64(pStr
, nRadix
);
582 rtl_String
* rtl_string_ImplAlloc(sal_Int32 nLen
) { return rtl::str::Alloc
<rtl_String
>(nLen
); }
584 void SAL_CALL
rtl_string_acquire(rtl_String
* pThis
) SAL_THROW_EXTERN_C()
586 return rtl::str::acquire(pThis
);
589 void SAL_CALL
rtl_string_release(rtl_String
* pThis
) SAL_THROW_EXTERN_C()
591 return rtl::str::release(pThis
);
594 void SAL_CALL
rtl_string_new(rtl_String
** ppThis
) SAL_THROW_EXTERN_C()
596 return rtl::str::new_(ppThis
);
599 rtl_String
* SAL_CALL
rtl_string_alloc(sal_Int32 nLen
) SAL_THROW_EXTERN_C()
602 return rtl::str::Alloc
<rtl_String
>(nLen
);
605 void SAL_CALL
rtl_string_new_WithLength(rtl_String
** ppThis
, sal_Int32 nLen
) SAL_THROW_EXTERN_C()
607 rtl::str::new_WithLength(ppThis
, nLen
);
610 void SAL_CALL
rtl_string_newFromString(rtl_String
** ppThis
, const rtl_String
* pStr
)
613 rtl::str::newFromString(ppThis
, pStr
);
616 void SAL_CALL
rtl_string_newFromStr(rtl_String
** ppThis
, const char* pCharStr
) SAL_THROW_EXTERN_C()
618 rtl::str::newFromStr(ppThis
, pCharStr
);
621 void SAL_CALL
rtl_string_newFromStr_WithLength(rtl_String
** ppThis
, const char* pCharStr
,
622 sal_Int32 nLen
) SAL_THROW_EXTERN_C()
624 rtl::str::newFromStr_WithLength(ppThis
, pCharStr
, nLen
);
627 void SAL_CALL
rtl_string_newFromSubString(rtl_String
** ppThis
, const rtl_String
* pFrom
,
628 sal_Int32 beginIndex
, sal_Int32 count
)
631 rtl::str::newFromSubString(ppThis
, pFrom
, beginIndex
, count
);
634 // Used when creating from string literals.
635 void SAL_CALL
rtl_string_newFromLiteral(rtl_String
** ppThis
, const char* pCharStr
, sal_Int32 nLen
,
636 sal_Int32 allocExtra
) SAL_THROW_EXTERN_C()
638 rtl::str::newFromLiteral(ppThis
, pCharStr
, nLen
, allocExtra
);
641 void SAL_CALL
rtl_string_assign(rtl_String
** ppThis
, rtl_String
* pStr
) SAL_THROW_EXTERN_C()
643 rtl::str::assign(ppThis
, pStr
);
646 sal_Int32 SAL_CALL
rtl_string_getLength(const rtl_String
* pThis
) SAL_THROW_EXTERN_C()
648 return rtl::str::getLength(pThis
);
651 char* SAL_CALL
rtl_string_getStr(rtl_String
* pThis
) SAL_THROW_EXTERN_C()
653 return rtl::str::getStr(pThis
);
656 void SAL_CALL
rtl_string_newConcat(rtl_String
** ppThis
, rtl_String
* pLeft
, rtl_String
* pRight
)
659 rtl::str::newConcat(ppThis
, pLeft
, pRight
);
662 void SAL_CALL
rtl_string_ensureCapacity(rtl_String
** ppThis
, sal_Int32 size
) SAL_THROW_EXTERN_C()
664 rtl::str::ensureCapacity(ppThis
, size
);
667 void SAL_CALL
rtl_string_newReplaceStrAt(rtl_String
** ppThis
, rtl_String
* pStr
, sal_Int32 nIndex
,
668 sal_Int32 nCount
, rtl_String
* pNewSubStr
)
671 rtl::str::newReplaceStrAt(ppThis
, pStr
, nIndex
, nCount
, pNewSubStr
);
674 void SAL_CALL
rtl_string_newReplace(rtl_String
** ppThis
, rtl_String
* pStr
, char cOld
, char cNew
)
677 rtl::str::newReplace(ppThis
, pStr
, cOld
, cNew
);
680 void SAL_CALL
rtl_string_newToAsciiLowerCase(rtl_String
** ppThis
, rtl_String
* pStr
)
683 rtl::str::newToAsciiLowerCase(ppThis
, pStr
);
686 void SAL_CALL
rtl_string_newToAsciiUpperCase(rtl_String
** ppThis
, rtl_String
* pStr
)
689 rtl::str::newToAsciiUpperCase(ppThis
, pStr
);
692 void SAL_CALL
rtl_string_newTrim(rtl_String
** ppThis
, rtl_String
* pStr
) SAL_THROW_EXTERN_C()
694 rtl::str::newTrim(ppThis
, pStr
);
697 sal_Int32 SAL_CALL
rtl_string_getToken(rtl_String
** ppThis
, rtl_String
* pStr
, sal_Int32 nToken
,
698 char cTok
, sal_Int32 nIndex
) SAL_THROW_EXTERN_C()
700 return rtl::str::getToken(ppThis
, pStr
, nToken
, cTok
, nIndex
);
703 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */