20 #ifndef INCLUDED_RTL_STRING_H 21 #define INCLUDED_RTL_STRING_H 585 #define RTL_STR_MAX_VALUEOFBOOLEAN 6 602 #define RTL_STR_MAX_VALUEOFCHAR 2 625 #define RTL_STR_MIN_RADIX 2 626 #define RTL_STR_MAX_RADIX 36 627 #define RTL_STR_MAX_VALUEOFINT32 33 650 #define RTL_STR_MAX_VALUEOFINT64 65 673 #define RTL_STR_MAX_VALUEOFUINT64 65 692 #define RTL_STR_MAX_VALUEOFFLOAT 15 711 #define RTL_STR_MAX_VALUEOFDOUBLE 25 840 # pragma pack(push, 8) 846 typedef struct _rtl_String
986 rtl_String ** newStr,
const rtl_String * from,
1080 rtl_String ** newStr, rtl_String * str, sal_Int32 idx, sal_Int32 count, rtl_String * subStr )
SAL_THROW_EXTERN_C();
1137 rtl_String ** newStr, rtl_String * str,
char const * from,
1138 sal_Int32 fromLength,
char const * to, sal_Int32 toLength,
1165 rtl_String ** newStr, rtl_String * str,
char const * from,
1166 sal_Int32 fromLength,
char const * to, sal_Int32 toLength)
1303 #define RTL_CONSTASCII_STRINGPARAM( constAsciiStr ) (&(constAsciiStr)[0]), \ 1304 ((sal_Int32)SAL_N_ELEMENTS(constAsciiStr)-1) 1319 #define RTL_CONSTASCII_LENGTH( constAsciiStr ) ((sal_Int32)(SAL_N_ELEMENTS(constAsciiStr)-1)) 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) 1397 rtl_String ** pTarget,
1426 #endif // INCLUDED_RTL_STRING_H 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.
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.
#define SAL_THROW_EXTERN_C()
Nothrow specification for C functions.
Definition: types.h:352
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.
SAL_DLLPUBLIC sal_Int32 rtl_str_hashCode(const sal_Char *str) SAL_THROW_EXTERN_C()
Return a hash code for a string.
sal_uInt16 rtl_TextEncoding
The various supported text encodings.
Definition: textenc.h:33
SAL_DLLPUBLIC sal_Int32 rtl_str_valueOfChar(sal_Char *str, sal_Char ch) SAL_THROW_EXTERN_C()
Create the string representation of a character.
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.
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.
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.
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.
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.
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.
SAL_DLLPUBLIC void rtl_string_newFromLiteral(rtl_String **newStr, const sal_Char *value, sal_Int32 len, sal_Int32 allocExtra) SAL_THROW_EXTERN_C()
#define SAL_DLLPUBLIC
Definition: saldllapi.h:30
SAL_DLLPUBLIC sal_Int32 rtl_str_compare(const sal_Char *first, const sal_Char *second) SAL_THROW_EXTERN_C()
Compare two strings.
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.
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.
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.
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 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.
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.
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 float rtl_str_toFloat(const sal_Char *str) SAL_THROW_EXTERN_C()
Interpret a string as a float.
SAL_DLLPUBLIC double rtl_str_toDouble(const sal_Char *str) SAL_THROW_EXTERN_C()
Interpret a string as a double.
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 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.
SAL_DLLPUBLIC sal_Int32 rtl_str_trim(sal_Char *str) SAL_THROW_EXTERN_C()
Remove white space from both ends of a string.
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_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.
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.
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.
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 sal_Int32 rtl_str_hashCode_WithLength(const sal_Char *str, sal_Int32 len) SAL_THROW_EXTERN_C()
Return a hash code for a string.
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.
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...
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.
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.
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 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 void rtl_string_release(rtl_String *str) SAL_THROW_EXTERN_C()
Decrement the reference count of a string.
sal_uInt16 sal_Unicode
Definition: types.h:142
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.
unsigned char sal_Bool
Definition: types.h:39
sal_Int32 oslInterlockedCount
Definition: interlck.h:36
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.
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.
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...
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 sal_Int32 rtl_str_getLength(const sal_Char *str) SAL_THROW_EXTERN_C()
Return the length of a string.
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 sal_Int32 rtl_str_valueOfBoolean(sal_Char *str, sal_Bool b) SAL_THROW_EXTERN_C()
Create the string representation of a boolean.
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 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.
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.
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_Bool rtl_str_toBoolean(const sal_Char *str) SAL_THROW_EXTERN_C()
Interpret a string as a boolean.
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_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.
char sal_Char
A legacy synonym for char.
Definition: types.h:121
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_string_getLength(const rtl_String *str) SAL_THROW_EXTERN_C()
Return the length of a string.
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.
SAL_DLLPUBLIC void rtl_str_toAsciiUpperCase(sal_Char *str) SAL_THROW_EXTERN_C()
Convert all ASCII lowercase letters to uppercase within a string.
SAL_DLLPUBLIC void rtl_string_acquire(rtl_String *str) SAL_THROW_EXTERN_C()
Increment the reference count of a string.
SAL_DLLPUBLIC sal_Int32 rtl_str_valueOfFloat(sal_Char *str, float f) SAL_THROW_EXTERN_C()
Create the string representation of a float.
SAL_DLLPUBLIC void rtl_str_toAsciiLowerCase(sal_Char *str) SAL_THROW_EXTERN_C()
Convert all ASCII uppercase letters to lowercase within a string.
SAL_DLLPUBLIC sal_Int32 rtl_str_valueOfDouble(sal_Char *str, double d) SAL_THROW_EXTERN_C()
Create the string representation of a double.
SAL_DLLPUBLIC sal_Int32 rtl_str_toInt32(const sal_Char *str, sal_Int16 radix) SAL_THROW_EXTERN_C()
Interpret a string as an integer.
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 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_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.