AlterOffice
AlterOffice 3.4 SDK C/C++ API Reference
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 
4 #ifndef INCLUDED_RTL_STRING_H
5 #define INCLUDED_RTL_STRING_H
6 
7 #include "sal/config.h"
8 
9 #include "osl/interlck.h"
10 #include "rtl/textcvt.h"
11 #include "sal/saldllapi.h"
12 #include "sal/types.h"
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
18 /* ======================================================================= */
19 
32 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_getLength(
33  const char * str ) SAL_THROW_EXTERN_C();
34 
53 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_compare(
54  const char * first, const char * second ) SAL_THROW_EXTERN_C();
55 
81 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_compare_WithLength(
82  const char * first, sal_Int32 firstLen, const char * second, sal_Int32 secondLen ) SAL_THROW_EXTERN_C();
83 
114  const char * first, sal_Int32 firstLen, const char * second, sal_Int32 secondLen, sal_Int32 shortenedLen ) SAL_THROW_EXTERN_C();
115 
142  const char * first, sal_Int32 firstLen, const char * second, sal_Int32 secondLen ) SAL_THROW_EXTERN_C();
143 
164  const char * first, const char * second ) SAL_THROW_EXTERN_C();
165 
194  const char * first, sal_Int32 firstLen, const char * second, sal_Int32 secondLen ) SAL_THROW_EXTERN_C();
195 
229  const char * first, sal_Int32 firstLen, const char * second, sal_Int32 secondLen, sal_Int32 shortenedLen ) SAL_THROW_EXTERN_C();
230 
243 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_hashCode(
244  const char * str ) SAL_THROW_EXTERN_C();
245 
261 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_hashCode_WithLength(
262  const char * str, sal_Int32 len ) SAL_THROW_EXTERN_C();
263 
278 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_indexOfChar(
279  const char * str, char ch ) SAL_THROW_EXTERN_C();
280 
298  const char * str, sal_Int32 len, char ch ) SAL_THROW_EXTERN_C();
299 
315 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_lastIndexOfChar(
316  const char * str, char ch ) SAL_THROW_EXTERN_C();
317 
336  const char * str, sal_Int32 len, char ch ) SAL_THROW_EXTERN_C();
337 
353 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_indexOfStr(
354  const char * str, const char * subStr ) SAL_THROW_EXTERN_C();
355 
379  const char * str, sal_Int32 len, const char * subStr, sal_Int32 subLen ) SAL_THROW_EXTERN_C();
380 
396 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_lastIndexOfStr(
397  const char * str, const char * subStr ) SAL_THROW_EXTERN_C();
398 
422  const char * str, sal_Int32 len, const char * subStr, sal_Int32 subLen ) SAL_THROW_EXTERN_C();
423 
438 SAL_DLLPUBLIC void SAL_CALL rtl_str_replaceChar(
439  char * str, char oldChar, char newChar ) SAL_THROW_EXTERN_C();
440 
459  char * str, sal_Int32 len, char oldChar, char newChar ) SAL_THROW_EXTERN_C();
460 
471  char * str ) SAL_THROW_EXTERN_C();
472 
486  char * str, sal_Int32 len ) SAL_THROW_EXTERN_C();
487 
498  char * str ) SAL_THROW_EXTERN_C();
499 
513  char * str, sal_Int32 len ) SAL_THROW_EXTERN_C();
514 
527 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_trim(
528  char * str ) SAL_THROW_EXTERN_C();
529 
546 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_trim_WithLength(
547  char * str, sal_Int32 len ) SAL_THROW_EXTERN_C();
548 
567 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_valueOfBoolean(
568  char * str, sal_Bool b ) SAL_THROW_EXTERN_C();
569 #define RTL_STR_MAX_VALUEOFBOOLEAN 6
570 
584 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_valueOfChar(
585  char * str, char ch ) SAL_THROW_EXTERN_C();
586 #define RTL_STR_MAX_VALUEOFCHAR 2
587 
607 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_valueOfInt32(
608  char * str, sal_Int32 i, sal_Int16 radix ) SAL_THROW_EXTERN_C();
609 #define RTL_STR_MIN_RADIX 2
610 #define RTL_STR_MAX_RADIX 36
611 #define RTL_STR_MAX_VALUEOFINT32 33
612 
632 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_valueOfInt64(
633  char * str, sal_Int64 l, sal_Int16 radix ) SAL_THROW_EXTERN_C();
634 #define RTL_STR_MAX_VALUEOFINT64 65
635 
655 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_valueOfUInt64(
656  char * str, sal_uInt64 l, sal_Int16 radix ) SAL_THROW_EXTERN_C();
657 #define RTL_STR_MAX_VALUEOFUINT64 65
658 
674 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_valueOfFloat(
675  char * str, float f ) SAL_THROW_EXTERN_C();
676 #define RTL_STR_MAX_VALUEOFFLOAT 15
677 
693 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_valueOfDouble(
694  char * str, double d ) SAL_THROW_EXTERN_C();
695 #define RTL_STR_MAX_VALUEOFDOUBLE 25
696 
709  const char * str ) SAL_THROW_EXTERN_C();
710 
727 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_toInt32(
728  const char * str, sal_Int16 radix ) SAL_THROW_EXTERN_C();
729 
748 SAL_DLLPUBLIC sal_uInt32 SAL_CALL rtl_str_toUInt32(
749  const char * str, sal_Int16 radix ) SAL_THROW_EXTERN_C();
750 
767 SAL_DLLPUBLIC sal_Int64 SAL_CALL rtl_str_toInt64(
768  const char * str, sal_Int16 radix ) SAL_THROW_EXTERN_C();
769 
791 SAL_DLLPUBLIC sal_Int64 SAL_CALL rtl_str_toInt64_WithLength(
792  const char * str, sal_Int16 radix, sal_Int32 nStrLength ) SAL_THROW_EXTERN_C();
793 
812 SAL_DLLPUBLIC sal_uInt64 SAL_CALL rtl_str_toUInt64(
813  const char * str, sal_Int16 radix ) SAL_THROW_EXTERN_C();
814 
827 SAL_DLLPUBLIC float SAL_CALL rtl_str_toFloat(
828  const char * str ) SAL_THROW_EXTERN_C();
829 
842 SAL_DLLPUBLIC double SAL_CALL rtl_str_toDouble(
843  const char * str ) SAL_THROW_EXTERN_C();
844 
845 /* ======================================================================= */
846 
847 #ifdef _WIN32
848 # pragma pack(push, 8)
849 #endif
850 
854 typedef struct _rtl_String
855 {
856  oslInterlockedCount refCount; /* opaque */
857  sal_Int32 length;
858  char buffer[1];
859 } rtl_String;
862 #if defined(_WIN32)
863 #pragma pack(pop)
864 #endif
865 
866 /* ----------------------------------------------------------------------- */
867 
873 SAL_DLLPUBLIC void SAL_CALL rtl_string_acquire( rtl_String * str ) SAL_THROW_EXTERN_C();
874 
882 SAL_DLLPUBLIC void SAL_CALL rtl_string_release( rtl_String * str ) SAL_THROW_EXTERN_C();
883 
890 SAL_DLLPUBLIC void SAL_CALL rtl_string_new( rtl_String ** newStr ) SAL_THROW_EXTERN_C();
891 
914 SAL_DLLPUBLIC rtl_String * SAL_CALL rtl_string_alloc(sal_Int32 nLen) SAL_THROW_EXTERN_C();
915 
929 SAL_DLLPUBLIC void SAL_CALL rtl_string_new_WithLength( rtl_String ** newStr, sal_Int32 len ) SAL_THROW_EXTERN_C();
930 
944 SAL_DLLPUBLIC void SAL_CALL rtl_string_newFromString( rtl_String ** newStr, const rtl_String * value ) SAL_THROW_EXTERN_C();
945 
959 SAL_DLLPUBLIC void SAL_CALL rtl_string_newFromStr( rtl_String ** newStr, const char * value ) SAL_THROW_EXTERN_C();
960 
978 SAL_DLLPUBLIC void SAL_CALL rtl_string_newFromStr_WithLength( rtl_String ** newStr, const char * value, sal_Int32 len ) SAL_THROW_EXTERN_C();
979 
995  rtl_String ** newStr, const rtl_String * from,
996  sal_Int32 beginIndex, sal_Int32 count ) SAL_THROW_EXTERN_C();
997 
1002 SAL_DLLPUBLIC void SAL_CALL rtl_string_newFromLiteral( rtl_String ** newStr, const char * value, sal_Int32 len, sal_Int32 allocExtra ) SAL_THROW_EXTERN_C();
1003 
1016 SAL_DLLPUBLIC void SAL_CALL rtl_string_assign( rtl_String ** str, rtl_String * rightValue ) SAL_THROW_EXTERN_C();
1017 
1028 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_string_getLength( const rtl_String * str ) SAL_THROW_EXTERN_C();
1029 
1038 SAL_DLLPUBLIC char * SAL_CALL rtl_string_getStr( rtl_String * str ) SAL_THROW_EXTERN_C();
1039 
1057 SAL_DLLPUBLIC void SAL_CALL rtl_string_newConcat( rtl_String ** newStr, rtl_String * left, rtl_String * right ) SAL_THROW_EXTERN_C();
1058 
1089  rtl_String ** newStr, rtl_String * str, sal_Int32 idx, sal_Int32 count, rtl_String * subStr ) SAL_THROW_EXTERN_C();
1090 
1091 #ifdef LIBO_INTERNAL_ONLY
1092 SAL_DLLPUBLIC void SAL_CALL rtl_string_newReplaceStrAt_WithLength (
1093  rtl_String ** newStr, rtl_String * str, sal_Int32 idx, sal_Int32 count, char const * subStr, sal_Int32 substrLen ) SAL_THROW_EXTERN_C();
1094 #endif
1095 
1120 SAL_DLLPUBLIC void SAL_CALL rtl_string_newReplace(
1121  rtl_String ** newStr, rtl_String * str, char oldChar, char newChar ) SAL_THROW_EXTERN_C();
1122 
1151  rtl_String ** newStr, rtl_String * str, char const * from,
1152  sal_Int32 fromLength, char const * to, sal_Int32 toLength,
1153  sal_Int32 * index) SAL_THROW_EXTERN_C();
1154 
1179  rtl_String ** newStr, rtl_String * str, char const * from,
1180  sal_Int32 fromLength, char const * to, sal_Int32 toLength)
1182 
1203  rtl_String ** newStr, rtl_String * str ) SAL_THROW_EXTERN_C();
1204 
1225  rtl_String ** newStr, rtl_String * str ) SAL_THROW_EXTERN_C();
1226 
1246 SAL_DLLPUBLIC void SAL_CALL rtl_string_newTrim(
1247  rtl_String ** newStr, rtl_String * str ) SAL_THROW_EXTERN_C();
1248 
1293 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_string_getToken(
1294  rtl_String ** newStr , rtl_String * str, sal_Int32 token, char cTok, sal_Int32 idx ) SAL_THROW_EXTERN_C();
1295 
1296 /* ======================================================================= */
1297 
1312 // The &foo[0] trick is intentional, it makes sure the type is char* or const char*
1313 // (plain cast to const char* would not work with non-const char foo[]="a", which seems to be allowed).
1314 // This is to avoid mistaken use with functions that accept string literals
1315 // (i.e. const char (&)[N]) where usage of this macro otherwise could match
1316 // the argument and a following int argument with a default value (e.g. OString::match()).
1317 #define RTL_CONSTASCII_STRINGPARAM( constAsciiStr ) (&(constAsciiStr)[0]), \
1318  ((sal_Int32)SAL_N_ELEMENTS(constAsciiStr)-1)
1319 
1333 #define RTL_CONSTASCII_LENGTH( constAsciiStr ) ((sal_Int32)(SAL_N_ELEMENTS(constAsciiStr)-1))
1334 
1335 /* ======================================================================= */
1336 
1337 /* predefined constants for String-Conversion */
1338 #define OUSTRING_TO_OSTRING_CVTFLAGS (RTL_UNICODETOTEXT_FLAGS_UNDEFINED_DEFAULT |\
1339  RTL_UNICODETOTEXT_FLAGS_INVALID_DEFAULT |\
1340  RTL_UNICODETOTEXT_FLAGS_UNDEFINED_REPLACE |\
1341  RTL_UNICODETOTEXT_FLAGS_PRIVATE_MAPTO0)
1342 
1343 /* ----------------------------------------------------------------------- */
1344 
1377 SAL_DLLPUBLIC void SAL_CALL rtl_uString2String(
1378  rtl_String ** newStr, const sal_Unicode * str, sal_Int32 len, rtl_TextEncoding encoding, sal_uInt32 convertFlags ) SAL_THROW_EXTERN_C();
1379 
1411  rtl_String ** pTarget,
1412  sal_Unicode const * pSource,
1413  sal_Int32 nLength,
1414  rtl_TextEncoding nEncoding,
1415  sal_uInt32 nFlags)
1417 
1434 SAL_DLLPUBLIC void SAL_CALL rtl_string_ensureCapacity( rtl_String ** str, sal_Int32 size ) SAL_THROW_EXTERN_C();
1435 
1436 #ifdef __cplusplus
1437 }
1438 #endif
1439 
1440 #endif // INCLUDED_RTL_STRING_H
1441 
1442 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SAL_DLLPUBLIC sal_Int32 rtl_str_valueOfChar(char *str, char ch) SAL_THROW_EXTERN_C()
Create the string representation of a character.
SAL_DLLPUBLIC void rtl_string_new(rtl_String **newStr) SAL_THROW_EXTERN_C()
Allocate a new string containing no characters.
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.
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.
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...
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.
SAL_DLLPUBLIC void rtl_string_newFromLiteral(rtl_String **newStr, const char *value, sal_Int32 len, sal_Int32 allocExtra) SAL_THROW_EXTERN_C()
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.
unsigned char sal_Bool
Definition: types.h:18
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.
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.
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.
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...
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.
SAL_DLLPUBLIC sal_Int32 rtl_str_toInt32(const char *str, sal_Int16 radix) SAL_THROW_EXTERN_C()
Interpret a string as an integer.
SAL_DLLPUBLIC void rtl_str_toAsciiUpperCase(char *str) SAL_THROW_EXTERN_C()
Convert all ASCII lowercase letters to uppercase within a string.
sal_uInt16 rtl_TextEncoding
The various supported text encodings.
Definition: textenc.h:17
SAL_DLLPUBLIC sal_Int32 rtl_str_compare(const char *first, const char *second) SAL_THROW_EXTERN_C()
Compare two strings.
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.
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.
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.
SAL_DLLPUBLIC sal_Int32 rtl_str_trim(char *str) SAL_THROW_EXTERN_C()
Remove white space from both ends of a string.
sal_uInt16 sal_Unicode
Definition: types.h:103
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.
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.
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.
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.
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.
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.
CPPU_DLLPUBLIC void SAL_THROW_EXTERN_C()
This method is called to wait for a reply of a previously sent request.
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_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.
SAL_DLLPUBLIC char * rtl_string_getStr(rtl_String *str) SAL_THROW_EXTERN_C()
Return a pointer to the underlying character array of a string.
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...
SAL_DLLPUBLIC sal_Int32 rtl_str_valueOfDouble(char *str, double d) SAL_THROW_EXTERN_C()
Create the string representation of a double.
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.
SAL_DLLPUBLIC void rtl_str_toAsciiLowerCase(char *str) SAL_THROW_EXTERN_C()
Convert all ASCII uppercase letters to lowercase within a string.
SAL_DLLPUBLIC double rtl_str_toDouble(const char *str) SAL_THROW_EXTERN_C()
Interpret a string as a double.
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...
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.
sal_Int32 oslInterlockedCount
Definition: interlck.h:24
SAL_DLLPUBLIC void rtl_string_assign(rtl_String **str, rtl_String *rightValue) SAL_THROW_EXTERN_C()
Assign a new value to a string.
SAL_DLLPUBLIC sal_uInt32 rtl_str_toUInt32(const char *str, sal_Int16 radix) SAL_THROW_EXTERN_C()
Interpret a string as an unsigned integer.
SAL_DLLPUBLIC sal_Int32 rtl_str_hashCode(const char *str) SAL_THROW_EXTERN_C()
Return a hash code for a string.
SAL_DLLPUBLIC float rtl_str_toFloat(const char *str) SAL_THROW_EXTERN_C()
Interpret a string as a float.
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...
SAL_DLLPUBLIC sal_Int32 rtl_str_valueOfBoolean(char *str, sal_Bool b) SAL_THROW_EXTERN_C()
Create the string representation of a boolean.
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.
SAL_DLLPUBLIC void rtl_string_release(rtl_String *str) SAL_THROW_EXTERN_C()
Decrement the reference count of a string.
SAL_DLLPUBLIC sal_Bool rtl_str_toBoolean(const char *str) SAL_THROW_EXTERN_C()
Interpret a string as a boolean.
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.
SAL_DLLPUBLIC sal_Int32 rtl_str_valueOfFloat(char *str, float f) SAL_THROW_EXTERN_C()
Create the string representation of a float.
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.
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.
SAL_DLLPUBLIC sal_Int32 rtl_string_getLength(const rtl_String *str) SAL_THROW_EXTERN_C()
Return the length of a string.
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.
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.
SAL_DLLPUBLIC sal_Int32 rtl_str_getLength(const char *str) SAL_THROW_EXTERN_C()
Return the length of a string.
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.
SAL_DLLPUBLIC sal_Int64 rtl_str_toInt64(const char *str, sal_Int16 radix) SAL_THROW_EXTERN_C()
Interpret a string as a long integer.
SAL_DLLPUBLIC void rtl_string_acquire(rtl_String *str) SAL_THROW_EXTERN_C()
Increment the reference count of a string.
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.
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.
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.
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.
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.
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.
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_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.
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.
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.
#define SAL_DLLPUBLIC
Definition: saldllapi.h:14