LibreOffice: rtl/string.h Source File

LibreOffice LibreOffice 5.1 SDK C/C++ API Reference

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List
- File Members

string.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 #ifndef INCLUDED_RTL_STRING_H
21 #define INCLUDED_RTL_STRING_H
22
23 #include <sal/config.h>
24
25 #include <osl/interlck.h>
26 #include <rtl/textcvt.h>
27 #include <sal/saldllapi.h>
28 #include <sal/types.h>
29
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33
34 /* ======================================================================= */
35
48 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_getLength(
49 const sal_Char * str ) SAL_THROW_EXTERN_C();
50
69 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_compare(
70 const sal_Char * first, const sal_Char * second ) SAL_THROW_EXTERN_C();
71
97 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_compare_WithLength(
98 const sal_Char * first, sal_Int32 firstLen, const sal_Char * second, sal_Int32 secondLen ) SAL_THROW_EXTERN_C();
99
129 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_shortenedCompare_WithLength(
130 const sal_Char * first, sal_Int32 firstLen, const sal_Char * second, sal_Int32 secondLen, sal_Int32 shortenedLen ) SAL_THROW_EXTERN_C();
131
157 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_reverseCompare_WithLength(
158 const sal_Char * first, sal_Int32 firstLen, const sal_Char * second, sal_Int32 secondLen ) SAL_THROW_EXTERN_C();
159
179 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_compareIgnoreAsciiCase(
180 const sal_Char * first, const sal_Char * second ) SAL_THROW_EXTERN_C();
181
209 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_compareIgnoreAsciiCase_WithLength(
210 const sal_Char * first, sal_Int32 firstLen, const sal_Char * second, sal_Int32 secondLen ) SAL_THROW_EXTERN_C();
211
244 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_shortenedCompareIgnoreAsciiCase_WithLength(
245 const sal_Char * first, sal_Int32 firstLen, const sal_Char * second, sal_Int32 secondLen, sal_Int32 shortenedLen ) SAL_THROW_EXTERN_C();
246
259 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_hashCode(
260 const sal_Char * str ) SAL_THROW_EXTERN_C();
261
277 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_hashCode_WithLength(
278 const sal_Char * str, sal_Int32 len ) SAL_THROW_EXTERN_C();
279
294 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_indexOfChar(
295 const sal_Char * str, sal_Char ch ) SAL_THROW_EXTERN_C();
296
313 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_indexOfChar_WithLength(
314 const sal_Char * str, sal_Int32 len, sal_Char ch ) SAL_THROW_EXTERN_C();
315
331 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_lastIndexOfChar(
332 const sal_Char * str, sal_Char ch ) SAL_THROW_EXTERN_C();
333
351 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_lastIndexOfChar_WithLength(
352 const sal_Char * str, sal_Int32 len, sal_Char ch ) SAL_THROW_EXTERN_C();
353
369 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_indexOfStr(
370 const sal_Char * str, const sal_Char * subStr ) SAL_THROW_EXTERN_C();
371
394 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_indexOfStr_WithLength(
395 const sal_Char * str, sal_Int32 len, const sal_Char * subStr, sal_Int32 subLen ) SAL_THROW_EXTERN_C();
396
412 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_lastIndexOfStr(
413 const sal_Char * str, const sal_Char * subStr ) SAL_THROW_EXTERN_C();
414
437 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_lastIndexOfStr_WithLength(
438 const sal_Char * str, sal_Int32 len, const sal_Char * subStr, sal_Int32 subLen ) SAL_THROW_EXTERN_C();
439
454 SAL_DLLPUBLIC void SAL_CALL rtl_str_replaceChar(
455 sal_Char * str, sal_Char oldChar, sal_Char newChar ) SAL_THROW_EXTERN_C();
456
474 SAL_DLLPUBLIC void SAL_CALL rtl_str_replaceChar_WithLength(
475 sal_Char * str, sal_Int32 len, sal_Char oldChar, sal_Char newChar ) SAL_THROW_EXTERN_C();
476
486 SAL_DLLPUBLIC void SAL_CALL rtl_str_toAsciiLowerCase(
487 sal_Char * str ) SAL_THROW_EXTERN_C();
488
501 SAL_DLLPUBLIC void SAL_CALL rtl_str_toAsciiLowerCase_WithLength(
502 sal_Char * str, sal_Int32 len ) SAL_THROW_EXTERN_C();
503
513 SAL_DLLPUBLIC void SAL_CALL rtl_str_toAsciiUpperCase(
514 sal_Char * str ) SAL_THROW_EXTERN_C();
515
528 SAL_DLLPUBLIC void SAL_CALL rtl_str_toAsciiUpperCase_WithLength(
529 sal_Char * str, sal_Int32 len ) SAL_THROW_EXTERN_C();
530
543 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_trim(
544 sal_Char * str ) SAL_THROW_EXTERN_C();
545
562 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_trim_WithLength(
563 sal_Char * str, sal_Int32 len ) SAL_THROW_EXTERN_C();
564
583 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_valueOfBoolean(
584 sal_Char * str, sal_Bool b ) SAL_THROW_EXTERN_C();
585 #define RTL_STR_MAX_VALUEOFBOOLEAN 6
586
600 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_valueOfChar(
601 sal_Char * str, sal_Char ch ) SAL_THROW_EXTERN_C();
602 #define RTL_STR_MAX_VALUEOFCHAR 2
603
623 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_valueOfInt32(
624 sal_Char * str, sal_Int32 i, sal_Int16 radix ) SAL_THROW_EXTERN_C();
625 #define RTL_STR_MIN_RADIX 2
626 #define RTL_STR_MAX_RADIX 36
627 #define RTL_STR_MAX_VALUEOFINT32 33
628
648 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_valueOfInt64(
649 sal_Char * str, sal_Int64 l, sal_Int16 radix ) SAL_THROW_EXTERN_C();
650 #define RTL_STR_MAX_VALUEOFINT64 65
651
671 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_valueOfUInt64(
672 sal_Char * str, sal_uInt64 l, sal_Int16 radix ) SAL_THROW_EXTERN_C();
673 #define RTL_STR_MAX_VALUEOFUINT64 65
674
690 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_valueOfFloat(
691 sal_Char * str, float f ) SAL_THROW_EXTERN_C();
692 #define RTL_STR_MAX_VALUEOFFLOAT 15
693
709 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_valueOfDouble(
710 sal_Char * str, double d ) SAL_THROW_EXTERN_C();
711 #define RTL_STR_MAX_VALUEOFDOUBLE 25
712
724 SAL_DLLPUBLIC sal_Bool SAL_CALL rtl_str_toBoolean(
725 const sal_Char * str ) SAL_THROW_EXTERN_C();
726
743 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_toInt32(
744 const sal_Char * str, sal_Int16 radix ) SAL_THROW_EXTERN_C();
745
764 SAL_DLLPUBLIC sal_uInt32 SAL_CALL rtl_str_toUInt32(
765 const sal_Char * str, sal_Int16 radix ) SAL_THROW_EXTERN_C();
766
783 SAL_DLLPUBLIC sal_Int64 SAL_CALL rtl_str_toInt64(
784 const sal_Char * str, sal_Int16 radix ) SAL_THROW_EXTERN_C();
785
804 SAL_DLLPUBLIC sal_uInt64 SAL_CALL rtl_str_toUInt64(
805 const sal_Char * str, sal_Int16 radix ) SAL_THROW_EXTERN_C();
806
819 SAL_DLLPUBLIC float SAL_CALL rtl_str_toFloat(
820 const sal_Char * str ) SAL_THROW_EXTERN_C();
821
834 SAL_DLLPUBLIC double SAL_CALL rtl_str_toDouble(
835 const sal_Char * str ) SAL_THROW_EXTERN_C();
836
837 /* ======================================================================= */
838
839 #ifdef SAL_W32
840 # pragma pack(push, 8)
841 #endif
842
846 typedef struct _rtl_String
847 {
848 oslInterlockedCount refCount; /* opaque */
849 sal_Int32 length;
850 sal_Char buffer[1];
851 } rtl_String;
854 #if defined(SAL_W32)
855 #pragma pack(pop)
856 #endif
857
858 /* ----------------------------------------------------------------------- */
859
865 SAL_DLLPUBLIC void SAL_CALL rtl_string_acquire( rtl_String * str ) SAL_THROW_EXTERN_C();
866
874 SAL_DLLPUBLIC void SAL_CALL rtl_string_release( rtl_String * str ) SAL_THROW_EXTERN_C();
875
882 SAL_DLLPUBLIC void SAL_CALL rtl_string_new( rtl_String ** newStr ) SAL_THROW_EXTERN_C();
883
905 SAL_DLLPUBLIC rtl_String * SAL_CALL rtl_string_alloc(sal_Int32 nLen) SAL_THROW_EXTERN_C();
906
920 SAL_DLLPUBLIC void SAL_CALL rtl_string_new_WithLength( rtl_String ** newStr, sal_Int32 len ) SAL_THROW_EXTERN_C();
921
935 SAL_DLLPUBLIC void SAL_CALL rtl_string_newFromString( rtl_String ** newStr, const rtl_String * value ) SAL_THROW_EXTERN_C();
936
950 SAL_DLLPUBLIC void SAL_CALL rtl_string_newFromStr( rtl_String ** newStr, const sal_Char * value ) SAL_THROW_EXTERN_C();
951
969 SAL_DLLPUBLIC void SAL_CALL rtl_string_newFromStr_WithLength( rtl_String ** newStr, const sal_Char * value, sal_Int32 len ) SAL_THROW_EXTERN_C();
970
985 SAL_DLLPUBLIC void SAL_CALL rtl_string_newFromSubString(
986 rtl_String ** newStr, const rtl_String * from,
987 sal_Int32 beginIndex, sal_Int32 count ) SAL_THROW_EXTERN_C();
988
993 SAL_DLLPUBLIC void SAL_CALL rtl_string_newFromLiteral( rtl_String ** newStr, const sal_Char * value, sal_Int32 len, sal_Int32 allocExtra ) SAL_THROW_EXTERN_C();
994
1007 SAL_DLLPUBLIC void SAL_CALL rtl_string_assign( rtl_String ** str, rtl_String * rightValue ) SAL_THROW_EXTERN_C();
1008
1019 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_string_getLength( const rtl_String * str ) SAL_THROW_EXTERN_C();
1020
1029 SAL_DLLPUBLIC sal_Char * SAL_CALL rtl_string_getStr( rtl_String * str ) SAL_THROW_EXTERN_C();
1030
1048 SAL_DLLPUBLIC void SAL_CALL rtl_string_newConcat( rtl_String ** newStr, rtl_String * left, rtl_String * right ) SAL_THROW_EXTERN_C();
1049
1079 SAL_DLLPUBLIC void SAL_CALL rtl_string_newReplaceStrAt(
1080 rtl_String ** newStr, rtl_String * str, sal_Int32 idx, sal_Int32 count, rtl_String * subStr ) SAL_THROW_EXTERN_C();
1081
1106 SAL_DLLPUBLIC void SAL_CALL rtl_string_newReplace(
1107 rtl_String ** newStr, rtl_String * str, sal_Char oldChar, sal_Char newChar ) SAL_THROW_EXTERN_C();
1108
1136 SAL_DLLPUBLIC void SAL_CALL rtl_string_newReplaceFirst(
1137 rtl_String ** newStr, rtl_String * str, char const * from,
1138 sal_Int32 fromLength, char const * to, sal_Int32 toLength,
1139 sal_Int32 * index) SAL_THROW_EXTERN_C();
1140
1164 SAL_DLLPUBLIC void SAL_CALL rtl_string_newReplaceAll(
1165 rtl_String ** newStr, rtl_String * str, char const * from,
1166 sal_Int32 fromLength, char const * to, sal_Int32 toLength)
1167 SAL_THROW_EXTERN_C();
1168
1188 SAL_DLLPUBLIC void SAL_CALL rtl_string_newToAsciiLowerCase(
1189 rtl_String ** newStr, rtl_String * str ) SAL_THROW_EXTERN_C();
1190
1210 SAL_DLLPUBLIC void SAL_CALL rtl_string_newToAsciiUpperCase(
1211 rtl_String ** newStr, rtl_String * str ) SAL_THROW_EXTERN_C();
1212
1232 SAL_DLLPUBLIC void SAL_CALL rtl_string_newTrim(
1233 rtl_String ** newStr, rtl_String * str ) SAL_THROW_EXTERN_C();
1234
1279 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_string_getToken(
1280 rtl_String ** newStr , rtl_String * str, sal_Int32 token, sal_Char cTok, sal_Int32 idx ) SAL_THROW_EXTERN_C();
1281
1282 /* ======================================================================= */
1283
1298 // The &foo[0] trick is intentional, it makes sure the type is char* or const char*
1299 // (plain cast to const char* would not work with non-const char foo[]="a", which seems to be allowed).
1300 // This is to avoid mistaken use with functions that accept string literals
1301 // (i.e. const char (&)[N]) where usage of this macro otherwise could match
1302 // the argument and a following int argument with a default value (e.g. OString::match()).
1303 #define RTL_CONSTASCII_STRINGPARAM( constAsciiStr ) (&(constAsciiStr)[0]), \
1304 ((sal_Int32)SAL_N_ELEMENTS(constAsciiStr)-1)
1305
1319 #define RTL_CONSTASCII_LENGTH( constAsciiStr ) ((sal_Int32)(SAL_N_ELEMENTS(constAsciiStr)-1))
1320
1321 /* ======================================================================= */
1322
1323 /* predefined constants for String-Conversion */
1324 #define OUSTRING_TO_OSTRING_CVTFLAGS (RTL_UNICODETOTEXT_FLAGS_UNDEFINED_DEFAULT |\
1325 RTL_UNICODETOTEXT_FLAGS_INVALID_DEFAULT |\
1326 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_REPLACE |\
1327 RTL_UNICODETOTEXT_FLAGS_PRIVATE_MAPTO0)
1328
1329 /* ----------------------------------------------------------------------- */
1330
1363 SAL_DLLPUBLIC void SAL_CALL rtl_uString2String(
1364 rtl_String ** newStr, const sal_Unicode * str, sal_Int32 len, rtl_TextEncoding encoding, sal_uInt32 convertFlags ) SAL_THROW_EXTERN_C();
1365
1396 SAL_DLLPUBLIC sal_Bool SAL_CALL rtl_convertUStringToString(
1397 rtl_String ** pTarget,
1398 sal_Unicode const * pSource,
1399 sal_Int32 nLength,
1400 rtl_TextEncoding nEncoding,
1401 sal_uInt32 nFlags)
1402 SAL_THROW_EXTERN_C();
1403
1420 SAL_DLLPUBLIC void SAL_CALL rtl_string_ensureCapacity( rtl_String ** str, sal_Int32 size ) SAL_THROW_EXTERN_C();
1421
1422 #ifdef __cplusplus
1423 }
1424 #endif
1425
1426 #endif // INCLUDED_RTL_STRING_H
1427
1428 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
rtl_str_toBoolean
SAL_DLLPUBLIC sal_Bool rtl_str_toBoolean(const sal_Char *str) SAL_THROW_EXTERN_C()
Interpret a string as a boolean.
rtl_str_valueOfBoolean
SAL_DLLPUBLIC sal_Int32 rtl_str_valueOfBoolean(sal_Char *str, sal_Bool b) SAL_THROW_EXTERN_C()
Create the string representation of a boolean.
rtl_str_hashCode_WithLength
SAL_DLLPUBLIC sal_Int32 rtl_str_hashCode_WithLength(const sal_Char *str, sal_Int32 len) SAL_THROW_EXTERN_C()
Return a hash code for a string.
rtl_string_newReplaceFirst
SAL_DLLPUBLIC void rtl_string_newReplaceFirst(rtl_String **newStr, rtl_String *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...
rtl_str_valueOfChar
SAL_DLLPUBLIC sal_Int32 rtl_str_valueOfChar(sal_Char *str, sal_Char ch) SAL_THROW_EXTERN_C()
Create the string representation of a character.
rtl_str_toFloat
SAL_DLLPUBLIC float rtl_str_toFloat(const sal_Char *str) SAL_THROW_EXTERN_C()
Interpret a string as a float.
rtl_str_indexOfStr_WithLength
SAL_DLLPUBLIC sal_Int32 rtl_str_indexOfStr_WithLength(const sal_Char *str, sal_Int32 len, const sal_Char *subStr, sal_Int32 subLen) SAL_THROW_EXTERN_C()
Search for the first occurrence of a substring within a string.
SAL_DLLPUBLIC
#define SAL_DLLPUBLIC
Definition: saldllapi.h:30
rtl_str_lastIndexOfChar
SAL_DLLPUBLIC sal_Int32 rtl_str_lastIndexOfChar(const sal_Char *str, sal_Char ch) SAL_THROW_EXTERN_C()
Search for the last occurrence of a character within a string.
rtl_str_trim_WithLength
SAL_DLLPUBLIC sal_Int32 rtl_str_trim_WithLength(sal_Char *str, sal_Int32 len) SAL_THROW_EXTERN_C()
Remove white space from both ends of the string.
interlck.h
sal_Char
char sal_Char
A legacy synonym for char.
Definition: types.h:130
rtl_str_shortenedCompare_WithLength
SAL_DLLPUBLIC sal_Int32 rtl_str_shortenedCompare_WithLength(const sal_Char *first, sal_Int32 firstLen, const sal_Char *second, sal_Int32 secondLen, sal_Int32 shortenedLen) SAL_THROW_EXTERN_C()
Compare two strings with a maximum count of characters.
rtl_string_ensureCapacity
SAL_DLLPUBLIC void rtl_string_ensureCapacity(rtl_String **str, sal_Int32 size) SAL_THROW_EXTERN_C()
Ensure a string has enough space for a given number of characters.
rtl_string_newReplace
SAL_DLLPUBLIC void rtl_string_newReplace(rtl_String **newStr, rtl_String *str, sal_Char oldChar, sal_Char newChar) SAL_THROW_EXTERN_C()
Create a new string by replacing all occurrences of a single character within another string...
config.h
rtl_string_new_WithLength
SAL_DLLPUBLIC void rtl_string_new_WithLength(rtl_String **newStr, sal_Int32 len) SAL_THROW_EXTERN_C()
Allocate a new string containing space for a given number of characters.
rtl_string_newFromLiteral
SAL_DLLPUBLIC void rtl_string_newFromLiteral(rtl_String **newStr, const sal_Char *value, sal_Int32 len, sal_Int32 allocExtra) SAL_THROW_EXTERN_C()
rtl_convertUStringToString
SAL_DLLPUBLIC sal_Bool rtl_convertUStringToString(rtl_String **pTarget, sal_Unicode const *pSource, sal_Int32 nLength, rtl_TextEncoding nEncoding, sal_uInt32 nFlags) SAL_THROW_EXTERN_C()
Converts a Unicode string to a byte string, signalling failure.
rtl_str_hashCode
SAL_DLLPUBLIC sal_Int32 rtl_str_hashCode(const sal_Char *str) SAL_THROW_EXTERN_C()
Return a hash code for a string.
rtl_str_replaceChar
SAL_DLLPUBLIC void rtl_str_replaceChar(sal_Char *str, sal_Char oldChar, sal_Char newChar) SAL_THROW_EXTERN_C()
Replace all occurrences of a single character within a string.
rtl_str_lastIndexOfChar_WithLength
SAL_DLLPUBLIC sal_Int32 rtl_str_lastIndexOfChar_WithLength(const sal_Char *str, sal_Int32 len, sal_Char ch) SAL_THROW_EXTERN_C()
Search for the last occurrence of a character within a string.
rtl_str_shortenedCompareIgnoreAsciiCase_WithLength
SAL_DLLPUBLIC sal_Int32 rtl_str_shortenedCompareIgnoreAsciiCase_WithLength(const sal_Char *first, sal_Int32 firstLen, const sal_Char *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...
rtl_string_newToAsciiLowerCase
SAL_DLLPUBLIC void rtl_string_newToAsciiLowerCase(rtl_String **newStr, rtl_String *str) SAL_THROW_EXTERN_C()
Create a new string by converting all ASCII uppercase letters to lowercase within another string...
rtl_str_compare
SAL_DLLPUBLIC sal_Int32 rtl_str_compare(const sal_Char *first, const sal_Char *second) SAL_THROW_EXTERN_C()
Compare two strings.
rtl_str_toInt64
SAL_DLLPUBLIC sal_Int64 rtl_str_toInt64(const sal_Char *str, sal_Int16 radix) SAL_THROW_EXTERN_C()
Interpret a string as a long integer.
rtl_uString2String
SAL_DLLPUBLIC void rtl_uString2String(rtl_String **newStr, const sal_Unicode *str, sal_Int32 len, rtl_TextEncoding encoding, sal_uInt32 convertFlags) SAL_THROW_EXTERN_C()
Create a new byte string by converting a Unicode string, using a specific text encoding.
rtl_str_toAsciiLowerCase
SAL_DLLPUBLIC void rtl_str_toAsciiLowerCase(sal_Char *str) SAL_THROW_EXTERN_C()
Convert all ASCII uppercase letters to lowercase within a string.
sal_Bool
unsigned char sal_Bool
Definition: types.h:48
rtl_string_newTrim
SAL_DLLPUBLIC void rtl_string_newTrim(rtl_String **newStr, rtl_String *str) SAL_THROW_EXTERN_C()
Create a new string by removing white space from both ends of another string.
textcvt.h
rtl_str_valueOfInt64
SAL_DLLPUBLIC sal_Int32 rtl_str_valueOfInt64(sal_Char *str, sal_Int64 l, sal_Int16 radix) SAL_THROW_EXTERN_C()
Create the string representation of a long integer.
rtl_string_newFromStr_WithLength
SAL_DLLPUBLIC void rtl_string_newFromStr_WithLength(rtl_String **newStr, const sal_Char *value, sal_Int32 len) SAL_THROW_EXTERN_C()
Allocate a new string that contains a copy of a character array.
rtl_str_lastIndexOfStr
SAL_DLLPUBLIC sal_Int32 rtl_str_lastIndexOfStr(const sal_Char *str, const sal_Char *subStr) SAL_THROW_EXTERN_C()
Search for the last occurrence of a substring within a string.
rtl_string_newReplaceStrAt
SAL_DLLPUBLIC void rtl_string_newReplaceStrAt(rtl_String **newStr, rtl_String *str, sal_Int32 idx, sal_Int32 count, rtl_String *subStr) SAL_THROW_EXTERN_C()
Create a new string by replacing a substring of another string.
rtl_string_getLength
SAL_DLLPUBLIC sal_Int32 rtl_string_getLength(const rtl_String *str) SAL_THROW_EXTERN_C()
Return the length of a string.
rtl_str_toInt32
SAL_DLLPUBLIC sal_Int32 rtl_str_toInt32(const sal_Char *str, sal_Int16 radix) SAL_THROW_EXTERN_C()
Interpret a string as an integer.
rtl_str_lastIndexOfStr_WithLength
SAL_DLLPUBLIC sal_Int32 rtl_str_lastIndexOfStr_WithLength(const sal_Char *str, sal_Int32 len, const sal_Char *subStr, sal_Int32 subLen) SAL_THROW_EXTERN_C()
Search for the last occurrence of a substring within a string.
rtl_string_newConcat
SAL_DLLPUBLIC void rtl_string_newConcat(rtl_String **newStr, rtl_String *left, rtl_String *right) SAL_THROW_EXTERN_C()
Create a new string that is the concatenation of two other strings.
sal_Unicode
sal_uInt16 sal_Unicode
Definition: types.h:155
rtl_str_compareIgnoreAsciiCase_WithLength
SAL_DLLPUBLIC sal_Int32 rtl_str_compareIgnoreAsciiCase_WithLength(const sal_Char *first, sal_Int32 firstLen, const sal_Char *second, sal_Int32 secondLen) SAL_THROW_EXTERN_C()
Compare two strings, ignoring the case of ASCII characters.
rtl_str_valueOfFloat
SAL_DLLPUBLIC sal_Int32 rtl_str_valueOfFloat(sal_Char *str, float f) SAL_THROW_EXTERN_C()
Create the string representation of a float.
rtl_str_valueOfDouble
SAL_DLLPUBLIC sal_Int32 rtl_str_valueOfDouble(sal_Char *str, double d) SAL_THROW_EXTERN_C()
Create the string representation of a double.
rtl_str_toUInt64
SAL_DLLPUBLIC sal_uInt64 rtl_str_toUInt64(const sal_Char *str, sal_Int16 radix) SAL_THROW_EXTERN_C()
Interpret a string as an unsigned long integer.
rtl_string_getStr
SAL_DLLPUBLIC sal_Char * rtl_string_getStr(rtl_String *str) SAL_THROW_EXTERN_C()
Return a pointer to the underlying character array of a string.
rtl_string_release
SAL_DLLPUBLIC void rtl_string_release(rtl_String *str) SAL_THROW_EXTERN_C()
Decrement the reference count of a string.
rtl_TextEncoding
sal_uInt16 rtl_TextEncoding
The various supported text encodings.
Definition: textenc.h:39
oslInterlockedCount
sal_Int32 oslInterlockedCount
Definition: interlck.h:32
rtl_string_newReplaceAll
SAL_DLLPUBLIC void rtl_string_newReplaceAll(rtl_String **newStr, rtl_String *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...
rtl_str_valueOfUInt64
SAL_DLLPUBLIC sal_Int32 rtl_str_valueOfUInt64(sal_Char *str, sal_uInt64 l, sal_Int16 radix) SAL_THROW_EXTERN_C()
Create the string representation of an unsigned long integer.
rtl_str_trim
SAL_DLLPUBLIC sal_Int32 rtl_str_trim(sal_Char *str) SAL_THROW_EXTERN_C()
Remove white space from both ends of a string.
rtl_string_new
SAL_DLLPUBLIC void rtl_string_new(rtl_String **newStr) SAL_THROW_EXTERN_C()
Allocate a new string containing no characters.
rtl_str_toAsciiLowerCase_WithLength
SAL_DLLPUBLIC void rtl_str_toAsciiLowerCase_WithLength(sal_Char *str, sal_Int32 len) SAL_THROW_EXTERN_C()
Convert all ASCII uppercase letters to lowercase within a string.
rtl_str_valueOfInt32
SAL_DLLPUBLIC sal_Int32 rtl_str_valueOfInt32(sal_Char *str, sal_Int32 i, sal_Int16 radix) SAL_THROW_EXTERN_C()
Create the string representation of an integer.
rtl_str_compare_WithLength
SAL_DLLPUBLIC sal_Int32 rtl_str_compare_WithLength(const sal_Char *first, sal_Int32 firstLen, const sal_Char *second, sal_Int32 secondLen) SAL_THROW_EXTERN_C()
Compare two strings.
rtl_string_acquire
SAL_DLLPUBLIC void rtl_string_acquire(rtl_String *str) SAL_THROW_EXTERN_C()
Increment the reference count of a string.
rtl_str_getLength
SAL_DLLPUBLIC sal_Int32 rtl_str_getLength(const sal_Char *str) SAL_THROW_EXTERN_C()
Return the length of a string.
rtl_str_indexOfChar
SAL_DLLPUBLIC sal_Int32 rtl_str_indexOfChar(const sal_Char *str, sal_Char ch) SAL_THROW_EXTERN_C()
Search for the first occurrence of a character within a string.
types.h
rtl_str_toDouble
SAL_DLLPUBLIC double rtl_str_toDouble(const sal_Char *str) SAL_THROW_EXTERN_C()
Interpret a string as a double.
rtl_string_newFromStr
SAL_DLLPUBLIC void rtl_string_newFromStr(rtl_String **newStr, const sal_Char *value) SAL_THROW_EXTERN_C()
Allocate a new string that contains a copy of a character array.
rtl_str_compareIgnoreAsciiCase
SAL_DLLPUBLIC sal_Int32 rtl_str_compareIgnoreAsciiCase(const sal_Char *first, const sal_Char *second) SAL_THROW_EXTERN_C()
Compare two strings, ignoring the case of ASCII characters.
rtl_string_newToAsciiUpperCase
SAL_DLLPUBLIC void rtl_string_newToAsciiUpperCase(rtl_String **newStr, rtl_String *str) SAL_THROW_EXTERN_C()
Create a new string by converting all ASCII lowercase letters to uppercase within another string...
SAL_THROW_EXTERN_C
#define SAL_THROW_EXTERN_C()
Nothrow specification for C functions.
Definition: types.h:368
rtl_str_toAsciiUpperCase
SAL_DLLPUBLIC void rtl_str_toAsciiUpperCase(sal_Char *str) SAL_THROW_EXTERN_C()
Convert all ASCII lowercase letters to uppercase within a string.
rtl_string_alloc
SAL_DLLPUBLIC rtl_String * rtl_string_alloc(sal_Int32 nLen) SAL_THROW_EXTERN_C()
Allocate a new string containing space for a given number of characters.
rtl_str_toAsciiUpperCase_WithLength
SAL_DLLPUBLIC void rtl_str_toAsciiUpperCase_WithLength(sal_Char *str, sal_Int32 len) SAL_THROW_EXTERN_C()
Convert all ASCII lowercase letters to uppercase within a string.
rtl_str_reverseCompare_WithLength
SAL_DLLPUBLIC sal_Int32 rtl_str_reverseCompare_WithLength(const sal_Char *first, sal_Int32 firstLen, const sal_Char *second, sal_Int32 secondLen) SAL_THROW_EXTERN_C()
Compare two strings from back to front.
rtl_string_getToken
SAL_DLLPUBLIC sal_Int32 rtl_string_getToken(rtl_String **newStr, rtl_String *str, sal_Int32 token, sal_Char cTok, sal_Int32 idx) SAL_THROW_EXTERN_C()
Create a new string by extracting a single token from another string.
rtl_string_newFromSubString
SAL_DLLPUBLIC void rtl_string_newFromSubString(rtl_String **newStr, const rtl_String *from, sal_Int32 beginIndex, sal_Int32 count) SAL_THROW_EXTERN_C()
Allocate a new string that is a substring of this string.
rtl_str_indexOfChar_WithLength
SAL_DLLPUBLIC sal_Int32 rtl_str_indexOfChar_WithLength(const sal_Char *str, sal_Int32 len, sal_Char ch) SAL_THROW_EXTERN_C()
Search for the first occurrence of a character within a string.
rtl_str_indexOfStr
SAL_DLLPUBLIC sal_Int32 rtl_str_indexOfStr(const sal_Char *str, const sal_Char *subStr) SAL_THROW_EXTERN_C()
Search for the first occurrence of a substring within a string.
rtl_str_toUInt32
SAL_DLLPUBLIC sal_uInt32 rtl_str_toUInt32(const sal_Char *str, sal_Int16 radix) SAL_THROW_EXTERN_C()
Interpret a string as an unsigned integer.
rtl_str_replaceChar_WithLength
SAL_DLLPUBLIC void rtl_str_replaceChar_WithLength(sal_Char *str, sal_Int32 len, sal_Char oldChar, sal_Char newChar) SAL_THROW_EXTERN_C()
Replace all occurrences of a single character within a string.
rtl_string_newFromString
SAL_DLLPUBLIC void rtl_string_newFromString(rtl_String **newStr, const rtl_String *value) SAL_THROW_EXTERN_C()
Allocate a new string that contains a copy of another string.
rtl_string_assign
SAL_DLLPUBLIC void rtl_string_assign(rtl_String **str, rtl_String *rightValue) SAL_THROW_EXTERN_C()
Assign a new value to a string.
saldllapi.h