LibreOffice: rtl/string.h Source File

LibreOffice LibreOffice 7.3 SDK C/C++ API Reference

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/*
21 * This file is part of LibreOffice published API.
22 */
23
24#ifndef INCLUDED_RTL_STRING_H
25#define INCLUDED_RTL_STRING_H
26
27#include "sal/config.h"
28
29#include "osl/interlck.h"
30#include "rtl/textcvt.h"
31#include "sal/saldllapi.h"
32#include "sal/types.h"
33
34#ifdef __cplusplus
35extern "C" {
36#endif
37
38/* ======================================================================= */
39
52 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_getLength(
53 const char * str ) SAL_THROW_EXTERN_C();
54
73 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_compare(
74 const char * first, const char * second ) SAL_THROW_EXTERN_C();
75
101 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_compare_WithLength(
102 const char * first, sal_Int32 firstLen, const char * second, sal_Int32 secondLen ) SAL_THROW_EXTERN_C();
103
133 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_shortenedCompare_WithLength(
134 const char * first, sal_Int32 firstLen, const char * second, sal_Int32 secondLen, sal_Int32 shortenedLen ) SAL_THROW_EXTERN_C();
135
161 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_reverseCompare_WithLength(
162 const char * first, sal_Int32 firstLen, const char * second, sal_Int32 secondLen ) SAL_THROW_EXTERN_C();
163
183 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_compareIgnoreAsciiCase(
184 const char * first, const char * second ) SAL_THROW_EXTERN_C();
185
213 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_compareIgnoreAsciiCase_WithLength(
214 const char * first, sal_Int32 firstLen, const char * second, sal_Int32 secondLen ) SAL_THROW_EXTERN_C();
215
248 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_shortenedCompareIgnoreAsciiCase_WithLength(
249 const char * first, sal_Int32 firstLen, const char * second, sal_Int32 secondLen, sal_Int32 shortenedLen ) SAL_THROW_EXTERN_C();
250
263 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_hashCode(
264 const char * str ) SAL_THROW_EXTERN_C();
265
281 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_hashCode_WithLength(
282 const char * str, sal_Int32 len ) SAL_THROW_EXTERN_C();
283
298 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_indexOfChar(
299 const char * str, char ch ) SAL_THROW_EXTERN_C();
300
317 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_indexOfChar_WithLength(
318 const char * str, sal_Int32 len, char ch ) SAL_THROW_EXTERN_C();
319
335 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_lastIndexOfChar(
336 const char * str, char ch ) SAL_THROW_EXTERN_C();
337
355 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_lastIndexOfChar_WithLength(
356 const char * str, sal_Int32 len, char ch ) SAL_THROW_EXTERN_C();
357
373 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_indexOfStr(
374 const char * str, const char * subStr ) SAL_THROW_EXTERN_C();
375
398 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_indexOfStr_WithLength(
399 const char * str, sal_Int32 len, const char * subStr, sal_Int32 subLen ) SAL_THROW_EXTERN_C();
400
416 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_lastIndexOfStr(
417 const char * str, const char * subStr ) SAL_THROW_EXTERN_C();
418
441 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_lastIndexOfStr_WithLength(
442 const char * str, sal_Int32 len, const char * subStr, sal_Int32 subLen ) SAL_THROW_EXTERN_C();
443
458 SAL_DLLPUBLIC void SAL_CALL rtl_str_replaceChar(
459 char * str, char oldChar, char newChar ) SAL_THROW_EXTERN_C();
460
478 SAL_DLLPUBLIC void SAL_CALL rtl_str_replaceChar_WithLength(
479 char * str, sal_Int32 len, char oldChar, char newChar ) SAL_THROW_EXTERN_C();
480
490 SAL_DLLPUBLIC void SAL_CALL rtl_str_toAsciiLowerCase(
491 char * str ) SAL_THROW_EXTERN_C();
492
505 SAL_DLLPUBLIC void SAL_CALL rtl_str_toAsciiLowerCase_WithLength(
506 char * str, sal_Int32 len ) SAL_THROW_EXTERN_C();
507
517 SAL_DLLPUBLIC void SAL_CALL rtl_str_toAsciiUpperCase(
518 char * str ) SAL_THROW_EXTERN_C();
519
532 SAL_DLLPUBLIC void SAL_CALL rtl_str_toAsciiUpperCase_WithLength(
533 char * str, sal_Int32 len ) SAL_THROW_EXTERN_C();
534
547 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_trim(
548 char * str ) SAL_THROW_EXTERN_C();
549
566 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_trim_WithLength(
567 char * str, sal_Int32 len ) SAL_THROW_EXTERN_C();
568
587 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_valueOfBoolean(
588 char * str, sal_Bool b ) SAL_THROW_EXTERN_C();
589#define RTL_STR_MAX_VALUEOFBOOLEAN 6
590
604 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_valueOfChar(
605 char * str, char ch ) SAL_THROW_EXTERN_C();
606#define RTL_STR_MAX_VALUEOFCHAR 2
607
627 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_valueOfInt32(
628 char * str, sal_Int32 i, sal_Int16 radix ) SAL_THROW_EXTERN_C();
629#define RTL_STR_MIN_RADIX 2
630#define RTL_STR_MAX_RADIX 36
631#define RTL_STR_MAX_VALUEOFINT32 33
632
652 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_valueOfInt64(
653 char * str, sal_Int64 l, sal_Int16 radix ) SAL_THROW_EXTERN_C();
654#define RTL_STR_MAX_VALUEOFINT64 65
655
675 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_valueOfUInt64(
676 char * str, sal_uInt64 l, sal_Int16 radix ) SAL_THROW_EXTERN_C();
677#define RTL_STR_MAX_VALUEOFUINT64 65
678
694 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_valueOfFloat(
695 char * str, float f ) SAL_THROW_EXTERN_C();
696#define RTL_STR_MAX_VALUEOFFLOAT 15
697
713 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_valueOfDouble(
714 char * str, double d ) SAL_THROW_EXTERN_C();
715#define RTL_STR_MAX_VALUEOFDOUBLE 25
716
728 SAL_DLLPUBLIC sal_Bool SAL_CALL rtl_str_toBoolean(
729 const char * str ) SAL_THROW_EXTERN_C();
730
747 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_toInt32(
748 const char * str, sal_Int16 radix ) SAL_THROW_EXTERN_C();
749
768 SAL_DLLPUBLIC sal_uInt32 SAL_CALL rtl_str_toUInt32(
769 const char * str, sal_Int16 radix ) SAL_THROW_EXTERN_C();
770
787 SAL_DLLPUBLIC sal_Int64 SAL_CALL rtl_str_toInt64(
788 const char * str, sal_Int16 radix ) SAL_THROW_EXTERN_C();
789
811 SAL_DLLPUBLIC sal_Int64 SAL_CALL rtl_str_toInt64_WithLength(
812 const char * str, sal_Int16 radix, sal_Int32 nStrLength ) SAL_THROW_EXTERN_C();
813
832 SAL_DLLPUBLIC sal_uInt64 SAL_CALL rtl_str_toUInt64(
833 const char * str, sal_Int16 radix ) SAL_THROW_EXTERN_C();
834
847 SAL_DLLPUBLIC float SAL_CALL rtl_str_toFloat(
848 const char * str ) SAL_THROW_EXTERN_C();
849
862 SAL_DLLPUBLIC double SAL_CALL rtl_str_toDouble(
863 const char * str ) SAL_THROW_EXTERN_C();
864
865/* ======================================================================= */
866
867#ifdef _WIN32
868# pragma pack(push, 8)
869#endif
870
874typedef struct _rtl_String
875{
876 oslInterlockedCount refCount; /* opaque */
877 sal_Int32 length;
878 char buffer[1];
879} rtl_String;
882#if defined(_WIN32)
883#pragma pack(pop)
884#endif
885
886/* ----------------------------------------------------------------------- */
887
893 SAL_DLLPUBLIC void SAL_CALL rtl_string_acquire( rtl_String * str ) SAL_THROW_EXTERN_C();
894
902 SAL_DLLPUBLIC void SAL_CALL rtl_string_release( rtl_String * str ) SAL_THROW_EXTERN_C();
903
910 SAL_DLLPUBLIC void SAL_CALL rtl_string_new( rtl_String ** newStr ) SAL_THROW_EXTERN_C();
911
934 SAL_DLLPUBLIC rtl_String * SAL_CALL rtl_string_alloc(sal_Int32 nLen) SAL_THROW_EXTERN_C();
935
949 SAL_DLLPUBLIC void SAL_CALL rtl_string_new_WithLength( rtl_String ** newStr, sal_Int32 len ) SAL_THROW_EXTERN_C();
950
964 SAL_DLLPUBLIC void SAL_CALL rtl_string_newFromString( rtl_String ** newStr, const rtl_String * value ) SAL_THROW_EXTERN_C();
965
979 SAL_DLLPUBLIC void SAL_CALL rtl_string_newFromStr( rtl_String ** newStr, const char * value ) SAL_THROW_EXTERN_C();
980
998 SAL_DLLPUBLIC void SAL_CALL rtl_string_newFromStr_WithLength( rtl_String ** newStr, const char * value, sal_Int32 len ) SAL_THROW_EXTERN_C();
999
1014 SAL_DLLPUBLIC void SAL_CALL rtl_string_newFromSubString(
1015 rtl_String ** newStr, const rtl_String * from,
1016 sal_Int32 beginIndex, sal_Int32 count ) SAL_THROW_EXTERN_C();
1017
1022 SAL_DLLPUBLIC void SAL_CALL rtl_string_newFromLiteral( rtl_String ** newStr, const char * value, sal_Int32 len, sal_Int32 allocExtra ) SAL_THROW_EXTERN_C();
1023
1036 SAL_DLLPUBLIC void SAL_CALL rtl_string_assign( rtl_String ** str, rtl_String * rightValue ) SAL_THROW_EXTERN_C();
1037
1048 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_string_getLength( const rtl_String * str ) SAL_THROW_EXTERN_C();
1049
1058 SAL_DLLPUBLIC char * SAL_CALL rtl_string_getStr( rtl_String * str ) SAL_THROW_EXTERN_C();
1059
1077 SAL_DLLPUBLIC void SAL_CALL rtl_string_newConcat( rtl_String ** newStr, rtl_String * left, rtl_String * right ) SAL_THROW_EXTERN_C();
1078
1108 SAL_DLLPUBLIC void SAL_CALL rtl_string_newReplaceStrAt(
1109 rtl_String ** newStr, rtl_String * str, sal_Int32 idx, sal_Int32 count, rtl_String * subStr ) SAL_THROW_EXTERN_C();
1110
1111#ifdef LIBO_INTERNAL_ONLY
1112 SAL_DLLPUBLIC void SAL_CALL rtl_string_newReplaceStrAt_WithLength (
1113 rtl_String ** newStr, rtl_String * str, sal_Int32 idx, sal_Int32 count, char const * subStr, sal_Int32 substrLen ) SAL_THROW_EXTERN_C();
1114#endif
1115
1140 SAL_DLLPUBLIC void SAL_CALL rtl_string_newReplace(
1141 rtl_String ** newStr, rtl_String * str, char oldChar, char newChar ) SAL_THROW_EXTERN_C();
1142
1170 SAL_DLLPUBLIC void SAL_CALL rtl_string_newReplaceFirst(
1171 rtl_String ** newStr, rtl_String * str, char const * from,
1172 sal_Int32 fromLength, char const * to, sal_Int32 toLength,
1173 sal_Int32 * index) SAL_THROW_EXTERN_C();
1174
1198 SAL_DLLPUBLIC void SAL_CALL rtl_string_newReplaceAll(
1199 rtl_String ** newStr, rtl_String * str, char const * from,
1200 sal_Int32 fromLength, char const * to, sal_Int32 toLength)
1201 SAL_THROW_EXTERN_C();
1202
1222 SAL_DLLPUBLIC void SAL_CALL rtl_string_newToAsciiLowerCase(
1223 rtl_String ** newStr, rtl_String * str ) SAL_THROW_EXTERN_C();
1224
1244 SAL_DLLPUBLIC void SAL_CALL rtl_string_newToAsciiUpperCase(
1245 rtl_String ** newStr, rtl_String * str ) SAL_THROW_EXTERN_C();
1246
1266 SAL_DLLPUBLIC void SAL_CALL rtl_string_newTrim(
1267 rtl_String ** newStr, rtl_String * str ) SAL_THROW_EXTERN_C();
1268
1313 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_string_getToken(
1314 rtl_String ** newStr , rtl_String * str, sal_Int32 token, char cTok, sal_Int32 idx ) SAL_THROW_EXTERN_C();
1315
1316/* ======================================================================= */
1317
1332// The &foo[0] trick is intentional, it makes sure the type is char* or const char*
1333// (plain cast to const char* would not work with non-const char foo[]="a", which seems to be allowed).
1334// This is to avoid mistaken use with functions that accept string literals
1335// (i.e. const char (&)[N]) where usage of this macro otherwise could match
1336// the argument and a following int argument with a default value (e.g. OString::match()).
1337#define RTL_CONSTASCII_STRINGPARAM( constAsciiStr ) (&(constAsciiStr)[0]), \
1338 ((sal_Int32)SAL_N_ELEMENTS(constAsciiStr)-1)
1339
1353#define RTL_CONSTASCII_LENGTH( constAsciiStr ) ((sal_Int32)(SAL_N_ELEMENTS(constAsciiStr)-1))
1354
1355/* ======================================================================= */
1356
1357/* predefined constants for String-Conversion */
1358#define OUSTRING_TO_OSTRING_CVTFLAGS (RTL_UNICODETOTEXT_FLAGS_UNDEFINED_DEFAULT |\
1359 RTL_UNICODETOTEXT_FLAGS_INVALID_DEFAULT |\
1360 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_REPLACE |\
1361 RTL_UNICODETOTEXT_FLAGS_PRIVATE_MAPTO0)
1362
1363/* ----------------------------------------------------------------------- */
1364
1397 SAL_DLLPUBLIC void SAL_CALL rtl_uString2String(
1398 rtl_String ** newStr, const sal_Unicode * str, sal_Int32 len, rtl_TextEncoding encoding, sal_uInt32 convertFlags ) SAL_THROW_EXTERN_C();
1399
1430 SAL_DLLPUBLIC sal_Bool SAL_CALL rtl_convertUStringToString(
1431 rtl_String ** pTarget,
1432 sal_Unicode const * pSource,
1433 sal_Int32 nLength,
1434 rtl_TextEncoding nEncoding,
1435 sal_uInt32 nFlags)
1436 SAL_THROW_EXTERN_C();
1437
1454 SAL_DLLPUBLIC void SAL_CALL rtl_string_ensureCapacity( rtl_String ** str, sal_Int32 size ) SAL_THROW_EXTERN_C();
1455
1456#ifdef __cplusplus
1457}
1458#endif
1459
1460#endif // INCLUDED_RTL_STRING_H
1461
1462/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
config.h
types.h
sal_Bool
unsigned char sal_Bool
Definition: types.h:38
SAL_THROW_EXTERN_C
#define SAL_THROW_EXTERN_C()
Nothrow specification for C functions.
Definition: types.h:334
sal_Unicode
sal_uInt16 sal_Unicode
Definition: types.h:123
saldllapi.h
SAL_DLLPUBLIC
#define SAL_DLLPUBLIC
Definition: saldllapi.h:34
textcvt.h
rtl_str_toDouble
SAL_DLLPUBLIC double rtl_str_toDouble(const char *str) SAL_THROW_EXTERN_C()
Interpret a string as a double.
rtl_str_compare
SAL_DLLPUBLIC sal_Int32 rtl_str_compare(const char *first, const char *second) SAL_THROW_EXTERN_C()
Compare two strings.
rtl_str_hashCode_WithLength
SAL_DLLPUBLIC sal_Int32 rtl_str_hashCode_WithLength(const char *str, sal_Int32 len) SAL_THROW_EXTERN_C()
Return a hash code for a string.
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_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_str_toBoolean
SAL_DLLPUBLIC sal_Bool rtl_str_toBoolean(const char *str) SAL_THROW_EXTERN_C()
Interpret a string as a boolean.
rtl_str_indexOfChar
SAL_DLLPUBLIC sal_Int32 rtl_str_indexOfChar(const char *str, char ch) SAL_THROW_EXTERN_C()
Search for the first occurrence of a character within a string.
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_indexOfStr
SAL_DLLPUBLIC sal_Int32 rtl_str_indexOfStr(const char *str, const char *subStr) SAL_THROW_EXTERN_C()
Search for the first occurrence of a substring within a string.
rtl_str_valueOfFloat
SAL_DLLPUBLIC sal_Int32 rtl_str_valueOfFloat(char *str, float f) SAL_THROW_EXTERN_C()
Create the string representation of a float.
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_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.
rtl_str_toUInt32
SAL_DLLPUBLIC sal_uInt32 rtl_str_toUInt32(const char *str, sal_Int16 radix) SAL_THROW_EXTERN_C()
Interpret a string as an unsigned integer.
rtl_str_compareIgnoreAsciiCase
SAL_DLLPUBLIC sal_Int32 rtl_str_compareIgnoreAsciiCase(const char *first, const char *second) SAL_THROW_EXTERN_C()
Compare two strings, ignoring the case of ASCII characters.
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.
rtl_str_lastIndexOfStr_WithLength
SAL_DLLPUBLIC sal_Int32 rtl_str_lastIndexOfStr_WithLength(const char *str, sal_Int32 len, const char *subStr, sal_Int32 subLen) SAL_THROW_EXTERN_C()
Search for the last occurrence of a substring within a string.
rtl_string_getStr
SAL_DLLPUBLIC char * rtl_string_getStr(rtl_String *str) SAL_THROW_EXTERN_C()
Return a pointer to the underlying character array of a string.
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_reverseCompare_WithLength
SAL_DLLPUBLIC sal_Int32 rtl_str_reverseCompare_WithLength(const char *first, sal_Int32 firstLen, const char *second, sal_Int32 secondLen) SAL_THROW_EXTERN_C()
Compare two strings from back to front.
rtl_str_toUInt64
SAL_DLLPUBLIC sal_uInt64 rtl_str_toUInt64(const char *str, sal_Int16 radix) SAL_THROW_EXTERN_C()
Interpret a string as an unsigned long integer.
rtl_string_getToken
SAL_DLLPUBLIC sal_Int32 rtl_string_getToken(rtl_String **newStr, rtl_String *str, sal_Int32 token, char cTok, sal_Int32 idx) SAL_THROW_EXTERN_C()
Create a new string by extracting a single token from another string.
rtl_str_trim
SAL_DLLPUBLIC sal_Int32 rtl_str_trim(char *str) SAL_THROW_EXTERN_C()
Remove white space from both ends of a string.
rtl_str_valueOfInt64
SAL_DLLPUBLIC sal_Int32 rtl_str_valueOfInt64(char *str, sal_Int64 l, sal_Int16 radix) SAL_THROW_EXTERN_C()
Create the string representation of a long integer.
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_string_newFromStr
SAL_DLLPUBLIC void rtl_string_newFromStr(rtl_String **newStr, const char *value) SAL_THROW_EXTERN_C()
Allocate a new string that contains a copy of a character array.
rtl_str_toAsciiLowerCase_WithLength
SAL_DLLPUBLIC void rtl_str_toAsciiLowerCase_WithLength(char *str, sal_Int32 len) SAL_THROW_EXTERN_C()
Convert all ASCII uppercase letters to lowercase within a string.
rtl_str_toAsciiLowerCase
SAL_DLLPUBLIC void rtl_str_toAsciiLowerCase(char *str) SAL_THROW_EXTERN_C()
Convert all ASCII uppercase letters to lowercase within a string.
rtl_str_valueOfDouble
SAL_DLLPUBLIC sal_Int32 rtl_str_valueOfDouble(char *str, double d) SAL_THROW_EXTERN_C()
Create the string representation of a double.
rtl_str_shortenedCompare_WithLength
SAL_DLLPUBLIC sal_Int32 rtl_str_shortenedCompare_WithLength(const char *first, sal_Int32 firstLen, const char *second, sal_Int32 secondLen, sal_Int32 shortenedLen) SAL_THROW_EXTERN_C()
Compare two strings with a maximum count of characters.
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_shortenedCompareIgnoreAsciiCase_WithLength
SAL_DLLPUBLIC sal_Int32 rtl_str_shortenedCompareIgnoreAsciiCase_WithLength(const char *first, sal_Int32 firstLen, const 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_str_indexOfChar_WithLength
SAL_DLLPUBLIC sal_Int32 rtl_str_indexOfChar_WithLength(const char *str, sal_Int32 len, char ch) SAL_THROW_EXTERN_C()
Search for the first occurrence of a character within a string.
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_valueOfBoolean
SAL_DLLPUBLIC sal_Int32 rtl_str_valueOfBoolean(char *str, sal_Bool b) SAL_THROW_EXTERN_C()
Create the string representation of a boolean.
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_string_newFromLiteral
SAL_DLLPUBLIC void rtl_string_newFromLiteral(rtl_String **newStr, const char *value, sal_Int32 len, sal_Int32 allocExtra) SAL_THROW_EXTERN_C()
rtl_str_replaceChar_WithLength
SAL_DLLPUBLIC void rtl_str_replaceChar_WithLength(char *str, sal_Int32 len, char oldChar, char newChar) SAL_THROW_EXTERN_C()
Replace all occurrences of a single character within a string.
rtl_str_valueOfChar
SAL_DLLPUBLIC sal_Int32 rtl_str_valueOfChar(char *str, char ch) SAL_THROW_EXTERN_C()
Create the string representation of a character.
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_str_toAsciiUpperCase_WithLength
SAL_DLLPUBLIC void rtl_str_toAsciiUpperCase_WithLength(char *str, sal_Int32 len) SAL_THROW_EXTERN_C()
Convert all ASCII lowercase letters to uppercase within a string.
rtl_str_hashCode
SAL_DLLPUBLIC sal_Int32 rtl_str_hashCode(const char *str) SAL_THROW_EXTERN_C()
Return a hash code for a string.
rtl_str_valueOfInt32
SAL_DLLPUBLIC sal_Int32 rtl_str_valueOfInt32(char *str, sal_Int32 i, sal_Int16 radix) SAL_THROW_EXTERN_C()
Create the string representation of an integer.
rtl_str_getLength
SAL_DLLPUBLIC sal_Int32 rtl_str_getLength(const char *str) SAL_THROW_EXTERN_C()
Return the length of a string.
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_string_newFromStr_WithLength
SAL_DLLPUBLIC void rtl_string_newFromStr_WithLength(rtl_String **newStr, const 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 char *str, const char *subStr) SAL_THROW_EXTERN_C()
Search for the last occurrence of a substring within a string.
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.
rtl_str_toInt32
SAL_DLLPUBLIC sal_Int32 rtl_str_toInt32(const char *str, sal_Int16 radix) SAL_THROW_EXTERN_C()
Interpret a string as an integer.
rtl_str_toInt64_WithLength
SAL_DLLPUBLIC sal_Int64 rtl_str_toInt64_WithLength(const char *str, sal_Int16 radix, sal_Int32 nStrLength) SAL_THROW_EXTERN_C()
Interpret a string as a long integer.
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_release
SAL_DLLPUBLIC void rtl_string_release(rtl_String *str) SAL_THROW_EXTERN_C()
Decrement the reference count of a string.
rtl_str_trim_WithLength
SAL_DLLPUBLIC sal_Int32 rtl_str_trim_WithLength(char *str, sal_Int32 len) SAL_THROW_EXTERN_C()
Remove white space from both ends of the 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_indexOfStr_WithLength
SAL_DLLPUBLIC sal_Int32 rtl_str_indexOfStr_WithLength(const char *str, sal_Int32 len, const char *subStr, sal_Int32 subLen) SAL_THROW_EXTERN_C()
Search for the first occurrence of a substring within a string.
rtl_str_toAsciiUpperCase
SAL_DLLPUBLIC void rtl_str_toAsciiUpperCase(char *str) SAL_THROW_EXTERN_C()
Convert all ASCII lowercase letters to uppercase within a string.
rtl_str_valueOfUInt64
SAL_DLLPUBLIC sal_Int32 rtl_str_valueOfUInt64(char *str, sal_uInt64 l, sal_Int16 radix) SAL_THROW_EXTERN_C()
Create the string representation of an unsigned long integer.
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_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.
rtl_str_toFloat
SAL_DLLPUBLIC float rtl_str_toFloat(const char *str) SAL_THROW_EXTERN_C()
Interpret a string as a float.
rtl_string_newReplace
SAL_DLLPUBLIC void rtl_string_newReplace(rtl_String **newStr, rtl_String *str, char oldChar, char newChar) SAL_THROW_EXTERN_C()
Create a new string by replacing all occurrences of a single character within another string.
rtl_str_toInt64
SAL_DLLPUBLIC sal_Int64 rtl_str_toInt64(const char *str, sal_Int16 radix) SAL_THROW_EXTERN_C()
Interpret a string as a long integer.
rtl_str_compareIgnoreAsciiCase_WithLength
SAL_DLLPUBLIC sal_Int32 rtl_str_compareIgnoreAsciiCase_WithLength(const char *first, sal_Int32 firstLen, const char *second, sal_Int32 secondLen) SAL_THROW_EXTERN_C()
Compare two strings, ignoring the case of ASCII characters.
rtl_str_lastIndexOfChar
SAL_DLLPUBLIC sal_Int32 rtl_str_lastIndexOfChar(const char *str, char ch) SAL_THROW_EXTERN_C()
Search for the last occurrence of a character within a string.
rtl_str_compare_WithLength
SAL_DLLPUBLIC sal_Int32 rtl_str_compare_WithLength(const char *first, sal_Int32 firstLen, const char *second, sal_Int32 secondLen) SAL_THROW_EXTERN_C()
Compare two strings.
rtl_str_lastIndexOfChar_WithLength
SAL_DLLPUBLIC sal_Int32 rtl_str_lastIndexOfChar_WithLength(const char *str, sal_Int32 len, char ch) SAL_THROW_EXTERN_C()
Search for the last occurrence of a character within a string.
rtl_str_replaceChar
SAL_DLLPUBLIC void rtl_str_replaceChar(char *str, char oldChar, char newChar) SAL_THROW_EXTERN_C()
Replace all occurrences of a single character within a string.
rtl_TextEncoding
sal_uInt16 rtl_TextEncoding
The various supported text encodings.
Definition: textenc.h:37
interlck.h
oslInterlockedCount
sal_Int32 oslInterlockedCount
Definition: interlck.h:44