24 #ifndef INCLUDED_RTL_STRING_H 25 #define INCLUDED_RTL_STRING_H 102 const char * first, sal_Int32 firstLen,
const char * second, sal_Int32 secondLen )
SAL_THROW_EXTERN_C();
134 const char * first, sal_Int32 firstLen,
const char * second, sal_Int32 secondLen, sal_Int32 shortenedLen )
SAL_THROW_EXTERN_C();
162 const char * first, sal_Int32 firstLen,
const char * second, sal_Int32 secondLen )
SAL_THROW_EXTERN_C();
214 const char * first, sal_Int32 firstLen,
const char * second, sal_Int32 secondLen )
SAL_THROW_EXTERN_C();
249 const char * first, sal_Int32 firstLen,
const char * second, sal_Int32 secondLen, sal_Int32 shortenedLen )
SAL_THROW_EXTERN_C();
399 const char * str, sal_Int32 len,
const char * subStr, sal_Int32 subLen )
SAL_THROW_EXTERN_C();
442 const char * str, sal_Int32 len,
const char * subStr, sal_Int32 subLen )
SAL_THROW_EXTERN_C();
589 #define RTL_STR_MAX_VALUEOFBOOLEAN 6 606 #define RTL_STR_MAX_VALUEOFCHAR 2 629 #define RTL_STR_MIN_RADIX 2 630 #define RTL_STR_MAX_RADIX 36 631 #define RTL_STR_MAX_VALUEOFINT32 33 654 #define RTL_STR_MAX_VALUEOFINT64 65 677 #define RTL_STR_MAX_VALUEOFUINT64 65 696 #define RTL_STR_MAX_VALUEOFFLOAT 15 715 #define RTL_STR_MAX_VALUEOFDOUBLE 25 870 typedef struct _rtl_String
1007 rtl_String ** newStr,
const rtl_String * from,
1101 rtl_String ** newStr, rtl_String * str, sal_Int32 idx, sal_Int32 count, rtl_String * subStr )
SAL_THROW_EXTERN_C();
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();
1133 rtl_String ** newStr, rtl_String * str,
char oldChar,
char newChar )
SAL_THROW_EXTERN_C();
1163 rtl_String ** newStr, rtl_String * str,
char const * from,
1164 sal_Int32 fromLength,
char const * to, sal_Int32 toLength,
1191 rtl_String ** newStr, rtl_String * str,
char const * from,
1192 sal_Int32 fromLength,
char const * to, sal_Int32 toLength)
1306 rtl_String ** newStr , rtl_String * str, sal_Int32 token,
char cTok, sal_Int32 idx )
SAL_THROW_EXTERN_C();
1329 #define RTL_CONSTASCII_STRINGPARAM( constAsciiStr ) (&(constAsciiStr)[0]), \ 1330 ((sal_Int32)SAL_N_ELEMENTS(constAsciiStr)-1) 1345 #define RTL_CONSTASCII_LENGTH( constAsciiStr ) ((sal_Int32)(SAL_N_ELEMENTS(constAsciiStr)-1)) 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) 1423 rtl_String ** pTarget,
1452 #endif // INCLUDED_RTL_STRING_H SAL_DLLPUBLIC sal_Int32 rtl_str_trim(char *str) SAL_THROW_EXTERN_C()
Remove white space from both ends of a string.
#define SAL_THROW_EXTERN_C()
Nothrow specification for C functions.
Definition: types.h:334
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 sal_Int32 rtl_str_valueOfFloat(char *str, float f) SAL_THROW_EXTERN_C()
Create the string representation of a float.
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 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 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 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 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_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_str_valueOfBoolean(char *str, sal_Bool b) SAL_THROW_EXTERN_C()
Create the string representation of a boolean.
#define SAL_DLLPUBLIC
Definition: saldllapi.h:34
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_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 void rtl_str_toAsciiLowerCase(char *str) SAL_THROW_EXTERN_C()
Convert all ASCII uppercase letters to lowercase within a string.
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_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_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.
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 double rtl_str_toDouble(const char *str) SAL_THROW_EXTERN_C()
Interpret a string as a double.
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_hashCode(const char *str) SAL_THROW_EXTERN_C()
Return a hash code for a string.
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_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_trim_WithLength(char *str, sal_Int32 len) SAL_THROW_EXTERN_C()
Remove white space from both ends of the 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 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:123
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_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_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:38
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_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 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_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_Bool rtl_str_toBoolean(const char *str) SAL_THROW_EXTERN_C()
Interpret a string as a boolean.
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 sal_uInt64 rtl_str_toUInt64(const char *str, sal_Int16 radix) SAL_THROW_EXTERN_C()
Interpret a string as an unsigned long integer.
sal_uInt16 rtl_TextEncoding
The various supported text encodings.
Definition: textenc.h:37
SAL_DLLPUBLIC void rtl_str_toAsciiUpperCase(char *str) SAL_THROW_EXTERN_C()
Convert all ASCII lowercase letters to uppercase within a string.
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.
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_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_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_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_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_assign(rtl_String **str, rtl_String *rightValue) SAL_THROW_EXTERN_C()
Assign a new value to a string.
sal_Int32 oslInterlockedCount
Definition: interlck.h:44
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_newFromLiteral(rtl_String **newStr, const char *value, sal_Int32 len, sal_Int32 allocExtra) SAL_THROW_EXTERN_C()
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.
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 sal_Int32 rtl_str_getLength(const char *str) SAL_THROW_EXTERN_C()
Return the length of a string.
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_valueOfInt64(char *str, sal_Int64 l, sal_Int16 radix) SAL_THROW_EXTERN_C()
Create the string representation of a long integer.
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_hashCode_WithLength(const char *str, sal_Int32 len) SAL_THROW_EXTERN_C()
Return a hash code for a string.
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 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 void rtl_string_acquire(rtl_String *str) SAL_THROW_EXTERN_C()
Increment the reference count of a string.
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_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 float rtl_str_toFloat(const char *str) SAL_THROW_EXTERN_C()
Interpret a string as a float.
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_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_toInt32(const 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_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 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.