LibreOffice
LibreOffice 7.4 SDK C/C++ API Reference
ustring.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 
20 /*
21  * This file is part of LibreOffice published API.
22  */
23 
24 #ifndef INCLUDED_RTL_USTRING_H
25 #define INCLUDED_RTL_USTRING_H
26 
27 #include "sal/config.h"
28 
29 #include "osl/interlck.h"
30 #include "rtl/string.h"
31 #include "rtl/textenc.h"
32 #include "sal/saldllapi.h"
33 #include "sal/types.h"
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
39 /* ======================================================================= */
40 
53 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_ustr_getLength(
54  const sal_Unicode * str ) SAL_THROW_EXTERN_C();
55 
74 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_ustr_compare(
75  const sal_Unicode * first, const sal_Unicode * second ) SAL_THROW_EXTERN_C();
76 
103  const sal_Unicode * first, sal_Int32 firstLen, const sal_Unicode * second, sal_Int32 secondLen ) SAL_THROW_EXTERN_C();
104 
135  const sal_Unicode * first, sal_Int32 firstLen, const sal_Unicode * second, sal_Int32 secondLen, sal_Int32 shortenedLen ) SAL_THROW_EXTERN_C();
136 
163  const sal_Unicode * first, sal_Int32 firstLen, const sal_Unicode * second, sal_Int32 secondLen ) SAL_THROW_EXTERN_C();
164 
187  const sal_Unicode * first, const char * second, sal_Int32 len ) SAL_THROW_EXTERN_C();
188 
209  const sal_Unicode * first, const sal_Unicode * second ) SAL_THROW_EXTERN_C();
210 
239  const sal_Unicode * first, sal_Int32 firstLen, const sal_Unicode * second, sal_Int32 secondLen ) SAL_THROW_EXTERN_C();
240 
274  const sal_Unicode * first, sal_Int32 firstLen, const sal_Unicode * second, sal_Int32 secondLen, sal_Int32 shortenedLen ) SAL_THROW_EXTERN_C();
275 
300  const sal_Unicode * first, const char * second ) SAL_THROW_EXTERN_C();
301 
329  const sal_Unicode * first, sal_Int32 firstLen, const char * second ) SAL_THROW_EXTERN_C();
330 
362  const sal_Unicode * first, sal_Int32 firstLen, const char * second, sal_Int32 shortenedLen ) SAL_THROW_EXTERN_C();
363 
394  const sal_Unicode * first, sal_Int32 firstLen, const char * second, sal_Int32 secondLen ) SAL_THROW_EXTERN_C();
395 
421  const sal_Unicode * first, const char * second ) SAL_THROW_EXTERN_C();
422 
452  const sal_Unicode * first, sal_Int32 firstLen, const char * second ) SAL_THROW_EXTERN_C();
453 
486  sal_Unicode const * first, sal_Int32 firstLen,
487  char const * second, sal_Int32 secondLen) SAL_THROW_EXTERN_C();
488 
523  const sal_Unicode * first, sal_Int32 firstLen, const char * second, sal_Int32 shortenedLen ) SAL_THROW_EXTERN_C();
524 
537 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_ustr_hashCode(
538  const sal_Unicode * str ) SAL_THROW_EXTERN_C();
539 
556  const sal_Unicode * str, sal_Int32 len ) SAL_THROW_EXTERN_C();
557 
573  const sal_Unicode * str, sal_Unicode ch ) SAL_THROW_EXTERN_C();
574 
592  const sal_Unicode * str, sal_Int32 len, sal_Unicode ch ) SAL_THROW_EXTERN_C();
593 
610  const sal_Unicode * str, sal_Unicode ch ) SAL_THROW_EXTERN_C();
611 
630  const sal_Unicode * str, sal_Int32 len, sal_Unicode ch ) SAL_THROW_EXTERN_C();
631 
648  const sal_Unicode * str, const sal_Unicode * subStr ) SAL_THROW_EXTERN_C();
649 
673  const sal_Unicode * str, sal_Int32 len, const sal_Unicode * subStr, sal_Int32 subLen ) SAL_THROW_EXTERN_C();
674 
700  sal_Unicode const * str, sal_Int32 len,
701  char const * subStr, sal_Int32 subLen) SAL_THROW_EXTERN_C();
702 
719  const sal_Unicode * str, const sal_Unicode * subStr ) SAL_THROW_EXTERN_C();
720 
744  const sal_Unicode * str, sal_Int32 len, const sal_Unicode * subStr, sal_Int32 subLen ) SAL_THROW_EXTERN_C();
745 
771  sal_Unicode const * str, sal_Int32 len,
772  char const * subStr, sal_Int32 subLen) SAL_THROW_EXTERN_C();
773 
789  sal_Unicode * str, sal_Unicode oldChar, sal_Unicode newChar ) SAL_THROW_EXTERN_C();
790 
809  sal_Unicode * str, sal_Int32 len, sal_Unicode oldChar, sal_Unicode newChar ) SAL_THROW_EXTERN_C();
810 
822 
836  sal_Unicode * str, sal_Int32 len ) SAL_THROW_EXTERN_C();
837 
849 
863  sal_Unicode * str, sal_Int32 len ) SAL_THROW_EXTERN_C();
864 
877 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_ustr_trim(
879 
897  sal_Unicode * str, sal_Int32 len ) SAL_THROW_EXTERN_C();
898 
919 #define RTL_USTR_MAX_VALUEOFBOOLEAN RTL_STR_MAX_VALUEOFBOOLEAN
920 
936 #define RTL_USTR_MAX_VALUEOFCHAR RTL_STR_MAX_VALUEOFCHAR
937 
958  sal_Unicode * str, sal_Int32 i, sal_Int16 radix ) SAL_THROW_EXTERN_C();
959 #define RTL_USTR_MIN_RADIX RTL_STR_MIN_RADIX
960 #define RTL_USTR_MAX_RADIX RTL_STR_MAX_RADIX
961 #define RTL_USTR_MAX_VALUEOFINT32 RTL_STR_MAX_VALUEOFINT32
962 
983  sal_Unicode * str, sal_Int64 l, sal_Int16 radix ) SAL_THROW_EXTERN_C();
984 #define RTL_USTR_MAX_VALUEOFINT64 RTL_STR_MAX_VALUEOFINT64
985 
1006  sal_Unicode * str, sal_uInt64 l, sal_Int16 radix ) SAL_THROW_EXTERN_C();
1007 #define RTL_USTR_MAX_VALUEOFUINT64 RTL_STR_MAX_VALUEOFUINT64
1008 
1025  sal_Unicode * str, float f ) SAL_THROW_EXTERN_C();
1026 #define RTL_USTR_MAX_VALUEOFFLOAT RTL_STR_MAX_VALUEOFFLOAT
1027 
1044  sal_Unicode * str, double d ) SAL_THROW_EXTERN_C();
1045 #define RTL_USTR_MAX_VALUEOFDOUBLE RTL_STR_MAX_VALUEOFDOUBLE
1046 
1059  const sal_Unicode * str ) SAL_THROW_EXTERN_C();
1060 
1077 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_ustr_toInt32(
1078  const sal_Unicode * str, sal_Int16 radix ) SAL_THROW_EXTERN_C();
1079 
1098 SAL_DLLPUBLIC sal_uInt32 SAL_CALL rtl_ustr_toUInt32(
1099  const sal_Unicode * str, sal_Int16 radix ) SAL_THROW_EXTERN_C();
1100 
1117 SAL_DLLPUBLIC sal_Int64 SAL_CALL rtl_ustr_toInt64(
1118  const sal_Unicode * str, sal_Int16 radix ) SAL_THROW_EXTERN_C();
1119 
1142  const sal_Unicode * str, sal_Int16 radix, sal_Int32 nStrLength ) SAL_THROW_EXTERN_C();
1143 
1162 SAL_DLLPUBLIC sal_uInt64 SAL_CALL rtl_ustr_toUInt64(
1163  const sal_Unicode * str, sal_Int16 radix ) SAL_THROW_EXTERN_C();
1164 
1178  const sal_Unicode * str ) SAL_THROW_EXTERN_C();
1179 
1193  const sal_Unicode * str ) SAL_THROW_EXTERN_C();
1194 
1195 /* ======================================================================= */
1196 
1197 #if defined(_WIN32)
1198 #pragma pack(push, 4)
1199 #endif
1200 
1204 typedef struct SAL_DLLPUBLIC_RTTI _rtl_uString
1205 {
1206  oslInterlockedCount refCount; /* opaque */
1207  sal_Int32 length;
1208  sal_Unicode buffer[1];
1209 } rtl_uString;
1212 #if defined(_WIN32)
1213 #pragma pack(pop)
1214 #endif
1215 
1216 /* ----------------------------------------------------------------------- */
1217 
1224  rtl_uString * str ) SAL_THROW_EXTERN_C() SAL_HOT;
1225 
1234  rtl_uString * str ) SAL_THROW_EXTERN_C() SAL_HOT;
1235 
1243  rtl_uString ** newStr ) SAL_THROW_EXTERN_C();
1244 
1267 SAL_DLLPUBLIC rtl_uString * SAL_CALL rtl_uString_alloc(sal_Int32 nLen) SAL_THROW_EXTERN_C();
1268 
1283  rtl_uString ** newStr, sal_Int32 nLen ) SAL_THROW_EXTERN_C();
1284 
1299  rtl_uString ** newStr, const rtl_uString * value ) SAL_THROW_EXTERN_C();
1300 
1315  rtl_uString ** newStr, const sal_Unicode * value ) SAL_THROW_EXTERN_C();
1316 
1335  rtl_uString ** newStr, const sal_Unicode * value, sal_Int32 len ) SAL_THROW_EXTERN_C();
1336 
1353  rtl_uString ** newStr, const rtl_uString * from,
1354  sal_Int32 beginIndex, sal_Int32 count ) SAL_THROW_EXTERN_C();
1355 
1374  rtl_uString ** newStr, const char * value ) SAL_THROW_EXTERN_C();
1375 
1381  rtl_uString ** newStr, const char * value, sal_Int32 len,
1382  sal_Int32 allocExtra ) SAL_THROW_EXTERN_C();
1383 
1404  rtl_uString ** newString, sal_uInt32 const * codePoints,
1405  sal_Int32 codePointCount) SAL_THROW_EXTERN_C();
1406 
1420  rtl_uString ** str, rtl_uString * rightValue ) SAL_THROW_EXTERN_C();
1421 
1433  const rtl_uString * str ) SAL_THROW_EXTERN_C();
1434 
1444  rtl_uString * str ) SAL_THROW_EXTERN_C();
1445 
1464  rtl_uString ** newStr, rtl_uString * left, rtl_uString * right ) SAL_THROW_EXTERN_C();
1465 
1487  rtl_uString ** newString, rtl_uString * left, char const * right,
1488  sal_Int32 rightLength);
1489 
1509  rtl_uString ** newString, rtl_uString * left, sal_Unicode const * right,
1510  sal_Int32 rightLength);
1511 
1542  rtl_uString ** newStr, rtl_uString * str, sal_Int32 idx, sal_Int32 count, rtl_uString * subStr ) SAL_THROW_EXTERN_C();
1543 
1544 #ifdef LIBO_INTERNAL_ONLY
1545 SAL_DLLPUBLIC void SAL_CALL rtl_uString_newReplaceStrAtUtf16L(
1546  rtl_uString ** newStr, rtl_uString * str, sal_Int32 idx, sal_Int32 count, sal_Unicode const * subStr, sal_Int32 substrLen ) SAL_THROW_EXTERN_C();
1547 #endif
1548 
1574  rtl_uString ** newStr, rtl_uString * str, sal_Unicode oldChar, sal_Unicode newChar ) SAL_THROW_EXTERN_C();
1575 
1598  rtl_uString ** newStr, rtl_uString * str, rtl_uString const * from,
1599  rtl_uString const * to, sal_Int32 * index) SAL_THROW_EXTERN_C();
1600 
1626  rtl_uString ** newStr, rtl_uString * str, char const * from,
1627  sal_Int32 fromLength, rtl_uString const * to, sal_Int32 * index)
1629 
1655  rtl_uString ** newStr, rtl_uString * str, rtl_uString const * from,
1656  char const * to, sal_Int32 toLength, sal_Int32 * index)
1658 
1687  rtl_uString ** newStr, rtl_uString * str, char const * from,
1688  sal_Int32 fromLength, char const * to, sal_Int32 toLength,
1689  sal_Int32 * index) SAL_THROW_EXTERN_C();
1690 
1723  rtl_uString ** newStr, rtl_uString * str, char const * from,
1724  sal_Int32 fromLength, sal_Unicode const * to, sal_Int32 toLength,
1725  sal_Int32 * index) SAL_THROW_EXTERN_C();
1726 
1759  rtl_uString ** newStr, rtl_uString * str, sal_Unicode const * from,
1760  sal_Int32 fromLength, char const * to, sal_Int32 toLength,
1761  sal_Int32 * index) SAL_THROW_EXTERN_C();
1762 
1795  rtl_uString ** newStr, rtl_uString * str, sal_Unicode const * from,
1796  sal_Int32 fromLength, sal_Unicode const * to, sal_Int32 toLength,
1797  sal_Int32 * index) SAL_THROW_EXTERN_C();
1798 
1817  rtl_uString ** newStr, rtl_uString * str, rtl_uString const * from,
1818  rtl_uString const * to) SAL_THROW_EXTERN_C();
1819 
1840  rtl_uString ** newStr, rtl_uString * str, rtl_uString const * from,
1841  rtl_uString const * to, sal_Int32 fromIndex) SAL_THROW_EXTERN_C();
1842 
1864  rtl_uString ** newStr, rtl_uString * str, char const * from,
1865  sal_Int32 fromLength, rtl_uString const * to) SAL_THROW_EXTERN_C();
1866 
1888  rtl_uString ** newStr, rtl_uString * str, rtl_uString const * from,
1889  char const * to, sal_Int32 toLength) SAL_THROW_EXTERN_C();
1890 
1915  rtl_uString ** newStr, rtl_uString * str, char const * from,
1916  sal_Int32 fromLength, char const * to, sal_Int32 toLength)
1918 
1946  rtl_uString ** newStr, rtl_uString * str, char const * from,
1947  sal_Int32 fromLength, sal_Unicode const * to, sal_Int32 toLength)
1949 
1977  rtl_uString ** newStr, rtl_uString * str, sal_Unicode const * from,
1978  sal_Int32 fromLength, char const * to, sal_Int32 toLength)
1980 
2008  rtl_uString ** newStr, rtl_uString * str, sal_Unicode const * from,
2009  sal_Int32 fromLength, sal_Unicode const * to, sal_Int32 toLength)
2011 
2012 #if defined LIBO_INTERNAL_ONLY
2041 SAL_DLLPUBLIC void SAL_CALL rtl_uString_newReplaceAllFromIndexUtf16LUtf16L(
2042  rtl_uString ** newStr, rtl_uString * str, sal_Unicode const * from,
2043  sal_Int32 fromLength, sal_Unicode const * to, sal_Int32 toLength, sal_Int32 fromIndex)
2045 #endif
2046 
2067  rtl_uString ** newStr, rtl_uString * str ) SAL_THROW_EXTERN_C();
2068 
2089  rtl_uString ** newStr, rtl_uString * str ) SAL_THROW_EXTERN_C();
2090 
2113  rtl_uString ** newStr, rtl_uString * str ) SAL_THROW_EXTERN_C();
2114 
2160  rtl_uString ** newStr , rtl_uString * str, sal_Int32 token, sal_Unicode cTok, sal_Int32 idx ) SAL_THROW_EXTERN_C();
2161 
2162 /* ======================================================================= */
2163 
2177 // The &foo[0] trick is intentional, it makes sure the type is char* or const char*
2178 // (plain cast to const char* would not work with non-const char foo[]="a", which seems to be allowed).
2179 // This is to avoid mistaken use with functions that accept string literals
2180 // (i.e. const char (&)[N]) where usage of this macro otherwise could match
2181 // the argument and a following int argument with a default value (e.g. OUString::match()).
2182 #define RTL_CONSTASCII_USTRINGPARAM( constAsciiStr ) (&(constAsciiStr)[0]), \
2183  ((sal_Int32)(SAL_N_ELEMENTS(constAsciiStr)-1)), RTL_TEXTENCODING_ASCII_US
2184 
2185 /* ======================================================================= */
2186 
2187 /* predefined constants for String-Conversion */
2188 #define OSTRING_TO_OUSTRING_CVTFLAGS (RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_MAPTOPRIVATE |\
2189  RTL_TEXTTOUNICODE_FLAGS_MBUNDEFINED_DEFAULT |\
2190  RTL_TEXTTOUNICODE_FLAGS_INVALID_DEFAULT)
2191 
2192 /* ----------------------------------------------------------------------- */
2193 
2227  rtl_uString ** newStr, const char * str, sal_Int32 len, rtl_TextEncoding encoding, sal_uInt32 convertFlags ) SAL_THROW_EXTERN_C();
2228 
2229 /* ======================================================================= */
2230 /* Interning methods */
2231 
2252  rtl_uString ** newStr, rtl_uString * str) SAL_THROW_EXTERN_C();
2253 
2290  rtl_uString ** newStr,
2291  const char * str,
2292  sal_Int32 len,
2293  rtl_TextEncoding encoding,
2294  sal_uInt32 convertFlags,
2295  sal_uInt32 *pInfo) SAL_THROW_EXTERN_C();
2296 
2350  rtl_uString const * string, sal_Int32 * indexUtf16,
2351  sal_Int32 incrementCodePoints);
2352 
2387  rtl_uString ** target, char const * source, sal_Int32 length,
2388  rtl_TextEncoding encoding, sal_uInt32 flags) SAL_THROW_EXTERN_C();
2389 
2406 SAL_DLLPUBLIC void SAL_CALL rtl_uString_ensureCapacity( rtl_uString ** str, sal_Int32 size ) SAL_THROW_EXTERN_C();
2407 
2408 #ifdef __cplusplus
2409 }
2410 #endif
2411 
2412 #endif // INCLUDED_RTL_USTRING_H
2413 
2414 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define SAL_DLLPUBLIC
Definition: saldllapi.h:34
unsigned char sal_Bool
Definition: types.h:38
#define SAL_THROW_EXTERN_C()
Nothrow specification for C functions.
Definition: types.h:334
sal_uInt16 sal_Unicode
Definition: types.h:123
sal_uInt16 rtl_TextEncoding
The various supported text encodings.
Definition: textenc.h:37
SAL_DLLPUBLIC sal_Int32 rtl_ustr_ascii_compareIgnoreAsciiCase_WithLengths(sal_Unicode const *first, sal_Int32 firstLen, char const *second, sal_Int32 secondLen) SAL_THROW_EXTERN_C()
Compare two strings, ignoring the case of ASCII characters.
SAL_DLLPUBLIC void rtl_uString_assign(rtl_uString **str, rtl_uString *rightValue) SAL_THROW_EXTERN_C()
Assign a new value to a string.
SAL_DLLPUBLIC 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()
Create a new string by replacing the first occurrence of a given substring with another substring.
SAL_DLLPUBLIC float rtl_ustr_toFloat(const sal_Unicode *str) SAL_THROW_EXTERN_C()
Interpret a string as a float.
SAL_DLLPUBLIC sal_Int32 rtl_ustr_ascii_shortenedCompare_WithLength(const sal_Unicode *first, sal_Int32 firstLen, const char *second, sal_Int32 shortenedLen) SAL_THROW_EXTERN_C()
Compare two strings with a maximum count of characters.
SAL_DLLPUBLIC void rtl_uString_new(rtl_uString **newStr) SAL_THROW_EXTERN_C()
Allocate a new string containing no characters.
SAL_DLLPUBLIC sal_Int32 rtl_ustr_compare_WithLength(const sal_Unicode *first, sal_Int32 firstLen, const sal_Unicode *second, sal_Int32 secondLen) SAL_THROW_EXTERN_C()
Compare two strings.
SAL_DLLPUBLIC void rtl_uString_newConcatUtf16L(rtl_uString **newString, rtl_uString *left, sal_Unicode const *right, sal_Int32 rightLength)
Create a new string that is the concatenation of two other strings.
SAL_DLLPUBLIC void rtl_uString_newReplaceAllAsciiL(rtl_uString **newStr, rtl_uString *str, char const *from, sal_Int32 fromLength, rtl_uString const *to) SAL_THROW_EXTERN_C()
Create a new string by replacing all occurrences of a given substring with another substring.
SAL_DLLPUBLIC 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()
Create a new string by replacing all occurrences of a given substring with another substring.
SAL_DLLPUBLIC void rtl_uString_newFromString(rtl_uString **newStr, const rtl_uString *value) SAL_THROW_EXTERN_C()
Allocate a new string that contains a copy of another string.
SAL_DLLPUBLIC sal_Int32 rtl_ustr_ascii_shortenedCompareIgnoreAsciiCase_WithLength(const sal_Unicode *first, sal_Int32 firstLen, const char *second, sal_Int32 shortenedLen) SAL_THROW_EXTERN_C()
Compare two strings with a maximum count of characters, ignoring the case of ASCII characters.
SAL_DLLPUBLIC sal_Int32 rtl_uString_getToken(rtl_uString **newStr, rtl_uString *str, sal_Int32 token, sal_Unicode cTok, sal_Int32 idx) SAL_THROW_EXTERN_C()
Create a new string by extracting a single token from another string.
SAL_DLLPUBLIC void rtl_uString_newFromStr_WithLength(rtl_uString **newStr, const sal_Unicode *value, sal_Int32 len) SAL_THROW_EXTERN_C()
Allocate a new string that contains a copy of a character array.
SAL_DLLPUBLIC sal_Int32 rtl_ustr_compareIgnoreAsciiCase(const sal_Unicode *first, const sal_Unicode *second) SAL_THROW_EXTERN_C()
Compare two strings, ignoring the case of ASCII characters.
SAL_DLLPUBLIC sal_Bool rtl_ustr_asciil_reverseEquals_WithLength(const sal_Unicode *first, const char *second, sal_Int32 len) SAL_THROW_EXTERN_C()
Compare two strings from back to front for equality.
SAL_DLLPUBLIC void rtl_uString_newFromLiteral(rtl_uString **newStr, const char *value, sal_Int32 len, sal_Int32 allocExtra) SAL_THROW_EXTERN_C()
SAL_DLLPUBLIC sal_Int64 rtl_ustr_toInt64_WithLength(const sal_Unicode *str, sal_Int16 radix, sal_Int32 nStrLength) SAL_THROW_EXTERN_C()
Interpret a string as a long integer.
SAL_DLLPUBLIC 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()
Create a new string by replacing all occurrences of a given substring with another substring.
SAL_DLLPUBLIC sal_Int32 rtl_ustr_trim_WithLength(sal_Unicode *str, sal_Int32 len) SAL_THROW_EXTERN_C()
Remove white space from both ends of the string.
SAL_DLLPUBLIC sal_Int32 rtl_ustr_valueOfBoolean(sal_Unicode *str, sal_Bool b) SAL_THROW_EXTERN_C()
Create the string representation of a boolean.
SAL_DLLPUBLIC double rtl_ustr_toDouble(const sal_Unicode *str) SAL_THROW_EXTERN_C()
Interpret a string as a double.
SAL_DLLPUBLIC sal_Int32 rtl_ustr_hashCode(const sal_Unicode *str) SAL_THROW_EXTERN_C()
Return a hash code for a string.
SAL_DLLPUBLIC void rtl_ustr_replaceChar_WithLength(sal_Unicode *str, sal_Int32 len, sal_Unicode oldChar, sal_Unicode newChar) SAL_THROW_EXTERN_C()
Replace all occurrences of a single character within a string.
SAL_DLLPUBLIC sal_Int32 rtl_ustr_valueOfFloat(sal_Unicode *str, float f) SAL_THROW_EXTERN_C()
Create the string representation of a float.
SAL_DLLPUBLIC sal_Int32 rtl_ustr_ascii_compare(const sal_Unicode *first, const char *second) SAL_THROW_EXTERN_C()
Compare two strings.
SAL_DLLPUBLIC 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()
Create a new string by replacing the first occurrence of a given substring with another substring.
SAL_DLLPUBLIC void rtl_ustr_toAsciiLowerCase(sal_Unicode *str) SAL_THROW_EXTERN_C()
Convert all ASCII uppercase letters to lowercase within a string.
SAL_DLLPUBLIC 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()
Create a new string by replacing the first occurrence of a given substring with another substring.
SAL_DLLPUBLIC sal_Int32 rtl_ustr_valueOfDouble(sal_Unicode *str, double d) SAL_THROW_EXTERN_C()
Create the string representation of a double.
SAL_DLLPUBLIC void rtl_uString_newReplaceAll(rtl_uString **newStr, rtl_uString *str, rtl_uString const *from, rtl_uString const *to) SAL_THROW_EXTERN_C()
Create a new string by replacing all occurrences of a given substring with another substring.
SAL_DLLPUBLIC sal_Int32 rtl_ustr_lastIndexOfStr(const sal_Unicode *str, const sal_Unicode *subStr) SAL_THROW_EXTERN_C()
Search for the last occurrence of a substring within a string.
SAL_DLLPUBLIC void rtl_ustr_replaceChar(sal_Unicode *str, sal_Unicode oldChar, sal_Unicode newChar) SAL_THROW_EXTERN_C()
Replace all occurrences of a single character within a string.
SAL_DLLPUBLIC void rtl_uString_newConcat(rtl_uString **newStr, rtl_uString *left, rtl_uString *right) SAL_THROW_EXTERN_C()
Create a new string that is the concatenation of two other strings.
SAL_DLLPUBLIC sal_Int32 rtl_ustr_ascii_compareIgnoreAsciiCase_WithLength(const sal_Unicode *first, sal_Int32 firstLen, const char *second) SAL_THROW_EXTERN_C()
Compare two strings, ignoring the case of ASCII characters.
SAL_DLLPUBLIC rtl_uString * rtl_uString_alloc(sal_Int32 nLen) SAL_THROW_EXTERN_C()
Allocate a new string containing space for a given number of characters.
SAL_DLLPUBLIC sal_Int32 rtl_ustr_lastIndexOfChar(const sal_Unicode *str, sal_Unicode ch) SAL_THROW_EXTERN_C()
Search for the last occurrence of a character within a string.
SAL_DLLPUBLIC sal_Int32 rtl_ustr_valueOfChar(sal_Unicode *str, sal_Unicode ch) SAL_THROW_EXTERN_C()
Create the string representation of a character.
SAL_DLLPUBLIC sal_Int32 rtl_ustr_indexOfStr(const sal_Unicode *str, const sal_Unicode *subStr) SAL_THROW_EXTERN_C()
Search for the first occurrence of a substring within a string.
SAL_DLLPUBLIC sal_Int32 rtl_ustr_ascii_compareIgnoreAsciiCase(const sal_Unicode *first, const char *second) SAL_THROW_EXTERN_C()
Compare two strings, ignoring the case of ASCII characters.
SAL_DLLPUBLIC sal_Int32 rtl_ustr_indexOfStr_WithLength(const sal_Unicode *str, sal_Int32 len, const sal_Unicode *subStr, sal_Int32 subLen) SAL_THROW_EXTERN_C()
Search for the first occurrence of a substring within a string.
SAL_DLLPUBLIC void rtl_uString_internConvert(rtl_uString **newStr, const char *str, sal_Int32 len, rtl_TextEncoding encoding, sal_uInt32 convertFlags, sal_uInt32 *pInfo) SAL_THROW_EXTERN_C()
Return a canonical representation for a string.
SAL_DLLPUBLIC void rtl_uString_acquire(rtl_uString *str) SAL_THROW_EXTERN_C() SAL_HOT
Increment the reference count of a string.
SAL_DLLPUBLIC sal_Int32 rtl_ustr_trim(sal_Unicode *str) SAL_THROW_EXTERN_C()
Remove white space from both ends of a string.
SAL_DLLPUBLIC sal_Int64 rtl_ustr_toInt64(const sal_Unicode *str, sal_Int16 radix) SAL_THROW_EXTERN_C()
Interpret a string as a long integer.
SAL_DLLPUBLIC void rtl_ustr_toAsciiLowerCase_WithLength(sal_Unicode *str, sal_Int32 len) SAL_THROW_EXTERN_C()
Convert all ASCII uppercase letters to lowercase within a string.
SAL_DLLPUBLIC void rtl_uString_newReplaceStrAt(rtl_uString **newStr, rtl_uString *str, sal_Int32 idx, sal_Int32 count, rtl_uString *subStr) SAL_THROW_EXTERN_C()
Create a new string by replacing a substring of another string.
SAL_DLLPUBLIC sal_Bool rtl_convertStringToUString(rtl_uString **target, char const *source, sal_Int32 length, rtl_TextEncoding encoding, sal_uInt32 flags) SAL_THROW_EXTERN_C()
Converts a byte string to a Unicode string, signalling failure.
SAL_DLLPUBLIC void rtl_uString_newReplaceAllToAsciiL(rtl_uString **newStr, rtl_uString *str, rtl_uString const *from, char const *to, sal_Int32 toLength) SAL_THROW_EXTERN_C()
Create a new string by replacing all occurrences of a given substring with another substring.
SAL_DLLPUBLIC sal_uInt32 rtl_uString_iterateCodePoints(rtl_uString const *string, sal_Int32 *indexUtf16, sal_Int32 incrementCodePoints)
Iterate through a string based on code points instead of UTF-16 code units.
SAL_DLLPUBLIC void rtl_uString_newToAsciiLowerCase(rtl_uString **newStr, rtl_uString *str) SAL_THROW_EXTERN_C()
Create a new string by converting all ASCII uppercase letters to lowercase within another string.
SAL_DLLPUBLIC void rtl_uString_ensureCapacity(rtl_uString **str, sal_Int32 size) SAL_THROW_EXTERN_C()
Ensure a string has enough space for a given number of characters.
SAL_DLLPUBLIC void rtl_ustr_toAsciiUpperCase_WithLength(sal_Unicode *str, sal_Int32 len) SAL_THROW_EXTERN_C()
Convert all ASCII lowercase letters to uppercase within a string.
SAL_DLLPUBLIC void rtl_uString_release(rtl_uString *str) SAL_THROW_EXTERN_C() SAL_HOT
Decrement the reference count of a string.
SAL_DLLPUBLIC sal_Int32 rtl_ustr_getLength(const sal_Unicode *str) SAL_THROW_EXTERN_C()
Return the length of a string.
SAL_DLLPUBLIC void rtl_uString_newFromAscii(rtl_uString **newStr, const char *value) SAL_THROW_EXTERN_C()
Allocate a new string that contains a copy of a character array.
SAL_DLLPUBLIC sal_Int32 rtl_ustr_compare(const sal_Unicode *first, const sal_Unicode *second) SAL_THROW_EXTERN_C()
Compare two strings.
SAL_DLLPUBLIC sal_Int32 rtl_ustr_valueOfInt64(sal_Unicode *str, sal_Int64 l, sal_Int16 radix) SAL_THROW_EXTERN_C()
Create the string representation of a long integer.
SAL_DLLPUBLIC sal_Int32 rtl_ustr_lastIndexOfAscii_WithLength(sal_Unicode const *str, sal_Int32 len, char const *subStr, sal_Int32 subLen) SAL_THROW_EXTERN_C()
Search for the last occurrence of an ASCII substring within a string.
SAL_DLLPUBLIC 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()
Create a new string by replacing the first occurrence of a given substring with another substring.
SAL_DLLPUBLIC sal_Int32 rtl_ustr_indexOfAscii_WithLength(sal_Unicode const *str, sal_Int32 len, char const *subStr, sal_Int32 subLen) SAL_THROW_EXTERN_C()
Search for the first occurrence of an ASCII substring within a string.
SAL_DLLPUBLIC sal_uInt64 rtl_ustr_toUInt64(const sal_Unicode *str, sal_Int16 radix) SAL_THROW_EXTERN_C()
Interpret a string as an unsigned long integer.
SAL_DLLPUBLIC 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()
Create a new string by replacing all occurrences of a given substring with another substring.
SAL_DLLPUBLIC sal_Int32 rtl_ustr_shortenedCompareIgnoreAsciiCase_WithLength(const sal_Unicode *first, sal_Int32 firstLen, const sal_Unicode *second, sal_Int32 secondLen, sal_Int32 shortenedLen) SAL_THROW_EXTERN_C()
Compare two strings with a maximum count of characters, ignoring the case of ASCII characters.
SAL_DLLPUBLIC void rtl_uString_new_WithLength(rtl_uString **newStr, sal_Int32 nLen) SAL_THROW_EXTERN_C()
Allocate a new string containing space for a given number of characters.
SAL_DLLPUBLIC void rtl_uString_newTrim(rtl_uString **newStr, rtl_uString *str) SAL_THROW_EXTERN_C()
Create a new string by removing white space from both ends of another string.
SAL_DLLPUBLIC 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()
Create a new string by replacing all occurrences of a given substring with another substring.
SAL_DLLPUBLIC sal_Int32 rtl_ustr_lastIndexOfChar_WithLength(const sal_Unicode *str, sal_Int32 len, sal_Unicode ch) SAL_THROW_EXTERN_C()
Search for the last occurrence of a character within a string.
SAL_DLLPUBLIC 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()
Create a new string by replacing the first occurrence of a given substring with another substring.
SAL_DLLPUBLIC sal_uInt32 rtl_ustr_toUInt32(const sal_Unicode *str, sal_Int16 radix) SAL_THROW_EXTERN_C()
Interpret a string as an unsigned integer.
SAL_DLLPUBLIC void rtl_uString_intern(rtl_uString **newStr, rtl_uString *str) SAL_THROW_EXTERN_C()
Return a canonical representation for a string.
SAL_DLLPUBLIC void rtl_string2UString(rtl_uString **newStr, const char *str, sal_Int32 len, rtl_TextEncoding encoding, sal_uInt32 convertFlags) SAL_THROW_EXTERN_C()
Create a new Unicode string by converting a byte string, using a specific text encoding.
SAL_DLLPUBLIC void rtl_uString_newFromStr(rtl_uString **newStr, const sal_Unicode *value) SAL_THROW_EXTERN_C()
Allocate a new string that contains a copy of a character array.
SAL_DLLPUBLIC sal_Int32 rtl_ustr_asciil_reverseCompare_WithLength(const sal_Unicode *first, sal_Int32 firstLen, const char *second, sal_Int32 secondLen) SAL_THROW_EXTERN_C()
Compare two strings from back to front.
SAL_DLLPUBLIC sal_Int32 rtl_ustr_ascii_compare_WithLength(const sal_Unicode *first, sal_Int32 firstLen, const char *second) SAL_THROW_EXTERN_C()
Compare two strings.
SAL_DLLPUBLIC sal_Int32 rtl_uString_getLength(const rtl_uString *str) SAL_THROW_EXTERN_C()
Return the length of a string.
SAL_DLLPUBLIC sal_Int32 rtl_ustr_indexOfChar(const sal_Unicode *str, sal_Unicode ch) SAL_THROW_EXTERN_C()
Search for the first occurrence of a character within a string.
SAL_DLLPUBLIC sal_Int32 rtl_ustr_toInt32(const sal_Unicode *str, sal_Int16 radix) SAL_THROW_EXTERN_C()
Interpret a string as an integer.
SAL_DLLPUBLIC sal_Unicode * rtl_uString_getStr(rtl_uString *str) SAL_THROW_EXTERN_C()
Return a pointer to the underlying character array of a string.
SAL_DLLPUBLIC 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()
Create a new string by replacing all occurrences of a given substring with another substring.
SAL_DLLPUBLIC sal_Int32 rtl_ustr_valueOfUInt64(sal_Unicode *str, sal_uInt64 l, sal_Int16 radix) SAL_THROW_EXTERN_C()
Create the string representation of an unsigned long integer.
SAL_DLLPUBLIC void rtl_uString_newFromCodePoints(rtl_uString **newString, sal_uInt32 const *codePoints, sal_Int32 codePointCount) SAL_THROW_EXTERN_C()
Allocate a new string from an array of Unicode code points.
SAL_DLLPUBLIC sal_Int32 rtl_ustr_compareIgnoreAsciiCase_WithLength(const sal_Unicode *first, sal_Int32 firstLen, const sal_Unicode *second, sal_Int32 secondLen) SAL_THROW_EXTERN_C()
Compare two strings, ignoring the case of ASCII characters.
SAL_DLLPUBLIC sal_Int32 rtl_ustr_reverseCompare_WithLength(const sal_Unicode *first, sal_Int32 firstLen, const sal_Unicode *second, sal_Int32 secondLen) SAL_THROW_EXTERN_C()
Compare two strings from back to front.
SAL_DLLPUBLIC sal_Int32 rtl_ustr_shortenedCompare_WithLength(const sal_Unicode *first, sal_Int32 firstLen, const sal_Unicode *second, sal_Int32 secondLen, sal_Int32 shortenedLen) SAL_THROW_EXTERN_C()
Compare two strings with a maximum count of characters.
SAL_DLLPUBLIC void rtl_ustr_toAsciiUpperCase(sal_Unicode *str) SAL_THROW_EXTERN_C()
Convert all ASCII lowercase letters to uppercase within a string.
SAL_DLLPUBLIC sal_Int32 rtl_ustr_valueOfInt32(sal_Unicode *str, sal_Int32 i, sal_Int16 radix) SAL_THROW_EXTERN_C()
Create the string representation of an integer.
SAL_DLLPUBLIC sal_Bool rtl_ustr_toBoolean(const sal_Unicode *str) SAL_THROW_EXTERN_C()
Interpret a string as a boolean.
SAL_DLLPUBLIC void rtl_uString_newReplace(rtl_uString **newStr, rtl_uString *str, sal_Unicode oldChar, sal_Unicode newChar) SAL_THROW_EXTERN_C()
Create a new string by replacing all occurrences of a single character within another string.
SAL_DLLPUBLIC sal_Int32 rtl_ustr_hashCode_WithLength(const sal_Unicode *str, sal_Int32 len) SAL_THROW_EXTERN_C()
Return a hash code for a string.
SAL_DLLPUBLIC 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()
Create a new string by replacing the first occurrence of a given substring with another substring.
SAL_DLLPUBLIC 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()
Create a new string by replacing the first occurrence of a given substring with another substring.
SAL_DLLPUBLIC void rtl_uString_newToAsciiUpperCase(rtl_uString **newStr, rtl_uString *str) SAL_THROW_EXTERN_C()
Create a new string by converting all ASCII lowercase letters to uppercase within another string.
SAL_DLLPUBLIC sal_Int32 rtl_ustr_lastIndexOfStr_WithLength(const sal_Unicode *str, sal_Int32 len, const sal_Unicode *subStr, sal_Int32 subLen) SAL_THROW_EXTERN_C()
Search for the last occurrence of a substring within a string.
SAL_DLLPUBLIC sal_Int32 rtl_ustr_indexOfChar_WithLength(const sal_Unicode *str, sal_Int32 len, sal_Unicode ch) SAL_THROW_EXTERN_C()
Search for the first occurrence of a character within a string.
SAL_DLLPUBLIC void rtl_uString_newFromSubString(rtl_uString **newStr, const rtl_uString *from, sal_Int32 beginIndex, sal_Int32 count) SAL_THROW_EXTERN_C()
Allocate a new string that is a substring of this string.
SAL_DLLPUBLIC void rtl_uString_newConcatAsciiL(rtl_uString **newString, rtl_uString *left, char const *right, sal_Int32 rightLength)
Create a new string that is the concatenation of two other strings.
sal_Int32 oslInterlockedCount
Definition: interlck.h:44