LibreOffice: rtl/string.h Source File

LibreOffice LibreOffice 26.2 SDK C/C++ API Reference

Loading...
Searching...
No Matches
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
870typedef struct _rtl_String
871{
872 oslInterlockedCount refCount; /* opaque */
873 sal_Int32 length;
874 char buffer[1];
875} rtl_String;
877
878/* ----------------------------------------------------------------------- */
879
885 SAL_DLLPUBLIC void SAL_CALL rtl_string_acquire( rtl_String * str ) SAL_THROW_EXTERN_C();
886
894 SAL_DLLPUBLIC void SAL_CALL rtl_string_release( rtl_String * str ) SAL_THROW_EXTERN_C();
895
902 SAL_DLLPUBLIC void SAL_CALL rtl_string_new( rtl_String ** newStr ) SAL_THROW_EXTERN_C();
903
926 SAL_DLLPUBLIC rtl_String * SAL_CALL rtl_string_alloc(sal_Int32 nLen) SAL_THROW_EXTERN_C();
927
941 SAL_DLLPUBLIC void SAL_CALL rtl_string_new_WithLength( rtl_String ** newStr, sal_Int32 len ) SAL_THROW_EXTERN_C();
942
956 SAL_DLLPUBLIC void SAL_CALL rtl_string_newFromString( rtl_String ** newStr, const rtl_String * value ) SAL_THROW_EXTERN_C();
957
971 SAL_DLLPUBLIC void SAL_CALL rtl_string_newFromStr( rtl_String ** newStr, const char * value ) SAL_THROW_EXTERN_C();
972
990 SAL_DLLPUBLIC void SAL_CALL rtl_string_newFromStr_WithLength( rtl_String ** newStr, const char * value, sal_Int32 len ) SAL_THROW_EXTERN_C();
991
1006 SAL_DLLPUBLIC void SAL_CALL rtl_string_newFromSubString(
1007 rtl_String ** newStr, const rtl_String * from,
1008 sal_Int32 beginIndex, sal_Int32 count ) SAL_THROW_EXTERN_C();
1009
1014 SAL_DLLPUBLIC void SAL_CALL rtl_string_newFromLiteral( rtl_String ** newStr, const char * value, sal_Int32 len, sal_Int32 allocExtra ) SAL_THROW_EXTERN_C();
1015
1028 SAL_DLLPUBLIC void SAL_CALL rtl_string_assign( rtl_String ** str, rtl_String * rightValue ) SAL_THROW_EXTERN_C();
1029
1040 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_string_getLength( const rtl_String * str ) SAL_THROW_EXTERN_C();
1041
1050 SAL_DLLPUBLIC char * SAL_CALL rtl_string_getStr( rtl_String * str ) SAL_THROW_EXTERN_C();
1051
1069 SAL_DLLPUBLIC void SAL_CALL rtl_string_newConcat( rtl_String ** newStr, rtl_String * left, rtl_String * right ) SAL_THROW_EXTERN_C();
1070
1100 SAL_DLLPUBLIC void SAL_CALL rtl_string_newReplaceStrAt(
1101 rtl_String ** newStr, rtl_String * str, sal_Int32 idx, sal_Int32 count, rtl_String * subStr ) SAL_THROW_EXTERN_C();
1102
1103#ifdef LIBO_INTERNAL_ONLY
1104 SAL_DLLPUBLIC void SAL_CALL rtl_string_newReplaceStrAt_WithLength (
1105 rtl_String ** newStr, rtl_String * str, sal_Int32 idx, sal_Int32 count, char const * subStr, sal_Int32 substrLen ) SAL_THROW_EXTERN_C();
1106#endif
1107
1132 SAL_DLLPUBLIC void SAL_CALL rtl_string_newReplace(
1133 rtl_String ** newStr, rtl_String * str, char oldChar, char newChar ) SAL_THROW_EXTERN_C();
1134
1162 SAL_DLLPUBLIC void SAL_CALL rtl_string_newReplaceFirst(
1163 rtl_String ** newStr, rtl_String * str, char const * from,
1164 sal_Int32 fromLength, char const * to, sal_Int32 toLength,
1165 sal_Int32 * index) SAL_THROW_EXTERN_C();
1166
1190 SAL_DLLPUBLIC void SAL_CALL rtl_string_newReplaceAll(
1191 rtl_String ** newStr, rtl_String * str, char const * from,
1192 sal_Int32 fromLength, char const * to, sal_Int32 toLength)
1193 SAL_THROW_EXTERN_C();
1194
1214 SAL_DLLPUBLIC void SAL_CALL rtl_string_newToAsciiLowerCase(
1215 rtl_String ** newStr, rtl_String * str ) SAL_THROW_EXTERN_C();
1216
1236 SAL_DLLPUBLIC void SAL_CALL rtl_string_newToAsciiUpperCase(
1237 rtl_String ** newStr, rtl_String * str ) SAL_THROW_EXTERN_C();
1238
1258 SAL_DLLPUBLIC void SAL_CALL rtl_string_newTrim(
1259 rtl_String ** newStr, rtl_String * str ) SAL_THROW_EXTERN_C();
1260
1305 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_string_getToken(
1306 rtl_String ** newStr , rtl_String * str, sal_Int32 token, char cTok, sal_Int32 idx ) SAL_THROW_EXTERN_C();
1307
1308/* ======================================================================= */
1309
1324// The &foo[0] trick is intentional, it makes sure the type is char* or const char*
1325// (plain cast to const char* would not work with non-const char foo[]="a", which seems to be allowed).
1326// This is to avoid mistaken use with functions that accept string literals
1327// (i.e. const char (&)[N]) where usage of this macro otherwise could match
1328// the argument and a following int argument with a default value (e.g. OString::match()).
1329#define RTL_CONSTASCII_STRINGPARAM( constAsciiStr ) (&(constAsciiStr)[0]), \
1330 ((sal_Int32)SAL_N_ELEMENTS(constAsciiStr)-1)
1331
1345#define RTL_CONSTASCII_LENGTH( constAsciiStr ) ((sal_Int32)(SAL_N_ELEMENTS(constAsciiStr)-1))
1346
1347/* ======================================================================= */
1348
1349/* predefined constants for String-Conversion */
1350#define OUSTRING_TO_OSTRING_CVTFLAGS (RTL_UNICODETOTEXT_FLAGS_UNDEFINED_DEFAULT |\
1351 RTL_UNICODETOTEXT_FLAGS_INVALID_DEFAULT |\
1352 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_REPLACE |\
1353 RTL_UNICODETOTEXT_FLAGS_PRIVATE_MAPTO0)
1354
1355/* ----------------------------------------------------------------------- */
1356
1389 SAL_DLLPUBLIC void SAL_CALL rtl_uString2String(
1390 rtl_String ** newStr, const sal_Unicode * str, sal_Int32 len, rtl_TextEncoding encoding, sal_uInt32 convertFlags ) SAL_THROW_EXTERN_C();
1391
1422 SAL_DLLPUBLIC sal_Bool SAL_CALL rtl_convertUStringToString(
1423 rtl_String ** pTarget,
1424 sal_Unicode const * pSource,
1425 sal_Int32 nLength,
1426 rtl_TextEncoding nEncoding,
1427 sal_uInt32 nFlags)
1428 SAL_THROW_EXTERN_C();
1429
1446 SAL_DLLPUBLIC void SAL_CALL rtl_string_ensureCapacity( rtl_String ** str, sal_Int32 size ) SAL_THROW_EXTERN_C();
1447
1448#ifdef __cplusplus
1449}
1450#endif
1451
1452#endif // INCLUDED_RTL_STRING_H
1453
1454/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
config.h
saldllapi.h
SAL_DLLPUBLIC
#define SAL_DLLPUBLIC
Definition saldllapi.h:34
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:352
sal_Unicode
sal_uInt16 sal_Unicode
Definition types.h:123
rtl_TextEncoding
sal_uInt16 rtl_TextEncoding
The various supported text encodings.
Definition textenc.h:37
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.
textcvt.h
interlck.h
oslInterlockedCount
sal_Int32 oslInterlockedCount
Definition interlck.h:44